function SystemHooks::queryEntityReferenceAlter

Same name and namespace in other branches
  1. 11.x core/modules/system/src/Hook/SystemHooks.php \Drupal\system\Hook\SystemHooks::queryEntityReferenceAlter()

Implements hook_query_TAG_alter() for entity reference selection handlers.

Attributes

#[Hook('query_entity_reference_alter')]

File

core/modules/system/src/Hook/SystemHooks.php, line 347

Class

SystemHooks
Hook implementations for system.

Namespace

Drupal\system\Hook

Code

public function queryEntityReferenceAlter(AlterableInterface $query) : void {
  $handler = $query->getMetadata('entity_reference_selection_handler');
  $handler->entityQueryAlter($query);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.