You are here

protected function EntityMatcher::addQueryTags in Linkit 8.5

Adds query tags to the query.

Parameters

\Drupal\Core\Entity\Query\QueryInterface $query: A query to add tags to.

1 call to EntityMatcher::addQueryTags()
EntityMatcher::buildEntityQuery in src/Plugin/Linkit/Matcher/EntityMatcher.php
Builds an EntityQuery to get entities.

File

src/Plugin/Linkit/Matcher/EntityMatcher.php, line 402

Class

EntityMatcher
Provides default linkit matchers for all entity types.

Namespace

Drupal\linkit\Plugin\Linkit\Matcher

Code

protected function addQueryTags(QueryInterface $query) {

  // Add tags to let other modules alter the query.
  $query
    ->addTag('linkit_entity_autocomplete');
  $query
    ->addTag('linkit_entity_' . $this->targetType . '_autocomplete');

  // Add access tag for the query.
  $query
    ->addTag('entity_access');
  $query
    ->addTag($this->targetType . '_access');
}