You are here

class SelectionEntityTypeFile in Entity reference 8

Hierarchy

Expanded class hierarchy of SelectionEntityTypeFile

File

lib/Drupal/entityreference/Plugin/Type/Selection/SelectionEntityTypeFile.php, line 17
Definition of Drupal\entityreference\Plugin\entityreference\selection\SelectionEntityTypeFile.

Namespace

Drupal\entityreference\Plugin\Type\Selection
View source
class SelectionEntityTypeFile extends SelectionBase {
  public function entityFieldQueryAlter(AlterableInterface $query) {

    // Core forces us to know about 'permanent' vs. 'temporary' files.
    $tables = $query
      ->getTables();
    $base_table = key($tables);
    $query
      ->condition('status', FILE_STATUS_PERMANENT);

    // Access control to files is a very difficult business. For now, we are not
    // going to give it a shot.
    // @todo: fix this when core access control is less insane.
    return $query;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SelectionBase::buildEntityFieldQuery protected function Build an EntityFieldQuery to get referencable entities. 1
SelectionBase::countReferencableEntities public function Implements EntityReferenceHandler::countReferencableEntities(). Overrides SelectionInterface::countReferencableEntities
SelectionBase::getReferencableEntities public function Implements EntityReferenceHandler::getReferencableEntities(). Overrides SelectionInterface::getReferencableEntities
SelectionBase::reAlterQuery protected function Helper method: pass a query to the alteration system again.
SelectionBase::settingsForm public static function Implements EntityReferenceHandler::settingsForm(). Overrides SelectionInterface::settingsForm
SelectionBase::validateAutocompleteInput public function Implements EntityReferenceHandler::validateAutocompleteInput(). Overrides SelectionInterface::validateAutocompleteInput
SelectionBase::validateReferencableEntities public function Implements EntityReferenceHandler::validateReferencableEntities(). Overrides SelectionInterface::validateReferencableEntities
SelectionBase::__construct public function
SelectionEntityTypeFile::entityFieldQueryAlter public function Implements EntityReferenceHandler::entityFieldQueryAlter(). Overrides SelectionBase::entityFieldQueryAlter