class FileSelection

Provides specific access control for the file entity type.

Plugin annotation


@Plugin(
  id = "file_default",
  module = "file",
  label = @Translation("File selection"),
  entity_types = {"file"},
  group = "default",
  weight = 1
)

Hierarchy

Expanded class hierarchy of FileSelection

File

drupal/core/modules/file/lib/Drupal/file/Plugin/entity_reference/selection/FileSelection.php, line 27
Contains \Drupal\file\Plugin\Type\selection\FileSelection.

Namespace

Drupal\file\Plugin\entity_reference\selection
View source
class FileSelection extends SelectionBase {

  /**
   * Overrides SelectionBase::buildEntityQuery().
   */
  public function buildEntityQuery($match = NULL, $match_operator = 'CONTAINS') {
    $query = parent::buildEntityQuery($match, $match_operator);
    $query
      ->condition('status', FILE_STATUS_PERMANENT);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FileSelection::buildEntityQuery public function Overrides SelectionBase::buildEntityQuery(). Overrides SelectionBase::buildEntityQuery
SelectionBase::$entity protected property The entity object, or NULL
SelectionBase::$field protected property The field array.
SelectionBase::$instance protected property The instance array.
SelectionBase::countReferencableEntities public function Implements SelectionInterface::countReferencableEntities(). Overrides SelectionInterface::countReferencableEntities
SelectionBase::entityQueryAlter public function Implements SelectionInterface::entityQueryAlter(). Overrides SelectionInterface::entityQueryAlter 3
SelectionBase::getReferencableEntities public function Implements SelectionInterface::getReferencableEntities(). Overrides SelectionInterface::getReferencableEntities 1
SelectionBase::reAlterQuery protected function Helper method: Passes a query to the alteration system again.
SelectionBase::settingsForm public static function Implements SelectionInterface::settingsForm(). Overrides SelectionInterface::settingsForm 2
SelectionBase::validateAutocompleteInput public function Implements SelectionInterface::validateAutocompleteInput(). Overrides SelectionInterface::validateAutocompleteInput
SelectionBase::validateReferencableEntities public function Implements SelectionInterface::validateReferencableEntities(). Overrides SelectionInterface::validateReferencableEntities
SelectionBase::__construct public function Constructs a SelectionBase object.