1 EntityReferenceSelectionHandlerGeneric.inc public EntityReferenceSelectionHandlerGeneric_taxonomy_term::entityFieldQueryAlter(SelectQueryInterface $query)

Implements EntityReferenceHandler::entityFieldQueryAlter().

Overrides EntityReferenceSelectionHandlerGeneric::entityFieldQueryAlter

File

core/modules/entityreference/plugins/selection/EntityReferenceSelectionHandlerGeneric.inc, line 520
Generic Entity handler.

Class

EntityReferenceSelectionHandlerGeneric_taxonomy_term
Override for the Taxonomy term entity type.

Code

public function entityFieldQueryAlter(SelectQueryInterface $query) {
  // Ensure that taxonomy terms cannot be viewed when the user doesn't have
  // access to the vocabulary.
  $base_table = $this->ensureBaseTable($query);
  $tag = 'taxonomy_vocabulary_access';
  $query->addTag($tag);
  backdrop_alter(array('query', 'query_' . $tag), $query);
}