function TaxonomyTestHooks::queryTermAccessAlter
Same name and namespace in other branches
- 11.x core/modules/taxonomy/tests/modules/taxonomy_test/src/Hook/TaxonomyTestHooks.php \Drupal\taxonomy_test\Hook\TaxonomyTestHooks::queryTermAccessAlter()
Implements hook_query_TAG_alter().
Attributes
#[Hook('query_term_access_alter')]
File
-
core/
modules/ taxonomy/ tests/ modules/ taxonomy_test/ src/ Hook/ TaxonomyTestHooks.php, line 49
Class
- TaxonomyTestHooks
- Hook implementations for taxonomy_test.
Namespace
Drupal\taxonomy_test\HookCode
public function queryTermAccessAlter(AlterableInterface $query) : void {
$value = \Drupal::state()->get('taxonomy_test_query_term_access_alter');
if (isset($value)) {
\Drupal::state()->set('taxonomy_test_query_term_access_alter', ++$value);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.