class SelectionEntityTypeFile in Entity reference 8
Hierarchy
- class \Drupal\entityreference\Plugin\entityreference\selection\SelectionBase implements SelectionInterface
- class \Drupal\entityreference\Plugin\Type\Selection\SelectionEntityTypeFile
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\SelectionView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SelectionBase:: |
protected | function | Build an EntityFieldQuery to get referencable entities. | 1 |
SelectionBase:: |
public | function |
Implements EntityReferenceHandler::countReferencableEntities(). Overrides SelectionInterface:: |
|
SelectionBase:: |
public | function |
Implements EntityReferenceHandler::getReferencableEntities(). Overrides SelectionInterface:: |
|
SelectionBase:: |
protected | function | Helper method: pass a query to the alteration system again. | |
SelectionBase:: |
public static | function |
Implements EntityReferenceHandler::settingsForm(). Overrides SelectionInterface:: |
|
SelectionBase:: |
public | function |
Implements EntityReferenceHandler::validateAutocompleteInput(). Overrides SelectionInterface:: |
|
SelectionBase:: |
public | function |
Implements EntityReferenceHandler::validateReferencableEntities(). Overrides SelectionInterface:: |
|
SelectionBase:: |
public | function | ||
SelectionEntityTypeFile:: |
public | function |
Implements EntityReferenceHandler::entityFieldQueryAlter(). Overrides SelectionBase:: |