You are here

function taxonomy_test_query_alter in Drupal 8

Same name and namespace in other branches
  1. 7 modules/simpletest/tests/taxonomy_test.module \taxonomy_test_query_alter()
  2. 9 core/modules/taxonomy/tests/modules/taxonomy_test/taxonomy_test.module \taxonomy_test_query_alter()
  3. 10 core/modules/taxonomy/tests/modules/taxonomy_test/taxonomy_test.module \taxonomy_test_query_alter()

Implements hook_query_alter().

2 string references to 'taxonomy_test_query_alter'
TaxonomyQueryAlterTest::assertQueryTagTestResult in core/modules/taxonomy/tests/src/Kernel/TaxonomyQueryAlterTest.php
Verifies invocation of the hooks in the test module.
TaxonomyQueryAlterTest::setupQueryTagTestHooks in core/modules/taxonomy/tests/src/Kernel/TaxonomyQueryAlterTest.php
Sets up the hooks in the test module.

File

core/modules/taxonomy/tests/modules/taxonomy_test/taxonomy_test.module, line 14
Provides test hook implementations for taxonomy tests.

Code

function taxonomy_test_query_alter(AlterableInterface $query) {
  $value = \Drupal::state()
    ->get(__FUNCTION__);
  if (isset($value)) {
    \Drupal::state()
      ->set(__FUNCTION__, ++$value);
  }
}