You are here

function system_query_entity_reference_alter in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/system.module \system_query_entity_reference_alter()
  2. 10 core/modules/system/system.module \system_query_entity_reference_alter()

Implements hook_query_TAG_alter() for entity reference selection handlers.

File

core/modules/system/system.module, line 1393
Configuration system that lets administrators modify the workings of the site.

Code

function system_query_entity_reference_alter(AlterableInterface $query) {
  $handler = $query
    ->getMetadata('entity_reference_selection_handler');
  $handler
    ->entityQueryAlter($query);
}