function hook_entity_query_ENTITY_TYPE_alter

Alter an entity query for a specific entity type.

Parameters

\Drupal\Core\Entity\Query\QueryInterface $query: The entity query.

See also

hook_entity_query_alter()

\Drupal\Core\Entity\Query\QueryInterface

Related topics

File

core/lib/Drupal/Core/Entity/entity.api.php, line 2372

Code

function hook_entity_query_ENTITY_TYPE_alter(\Drupal\Core\Entity\Query\QueryInterface $query) : void {
  $query->condition('id', '1', '<>');
}

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