Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / taxonomy / tests / modules / taxonomy_test / taxonomy_test.module
1 <?php
2
3 /**
4  * @file
5  * Provides test hook implementations for taxonomy tests.
6  */
7
8 use Drupal\Core\Database\Query\AlterableInterface;
9
10 /**
11  * Implements hook_query_alter().
12  */
13 function taxonomy_test_query_alter(AlterableInterface $query) {
14   $value = \Drupal::state()->get(__FUNCTION__);
15   if (isset($value)) {
16     \Drupal::state()->set(__FUNCTION__, ++$value);
17   }
18 }
19
20 /**
21  * Implements hook_query_TAG_alter().
22  */
23 function taxonomy_test_query_term_access_alter(AlterableInterface $query) {
24   $value = \Drupal::state()->get(__FUNCTION__);
25   if (isset($value)) {
26     \Drupal::state()->set(__FUNCTION__, ++$value);
27   }
28 }
29
30 /**
31  * Implements hook_query_TAG_alter().
32  */
33 function taxonomy_test_query_taxonomy_term_access_alter(AlterableInterface $query) {
34   $value = \Drupal::state()->get(__FUNCTION__);
35   if (isset($value)) {
36     \Drupal::state()->set(__FUNCTION__, ++$value);
37   }
38 }