function FilterTest::query

Same name and namespace in other branches
  1. 9 core/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterTest.php \Drupal\views_test_data\Plugin\views\filter\FilterTest::query()
  2. 8.9.x core/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterTest.php \Drupal\views_test_data\Plugin\views\filter\FilterTest::query()
  3. 10 core/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterTest.php \Drupal\views_test_data\Plugin\views\filter\FilterTest::query()

Add this filter to the query.

Due to the nature of fapi, the value and the operator have an unintended level of indirection. You will find them in $this->operator and $this->value respectively.

Overrides FilterPluginBase::query

File

core/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterTest.php, line 46

Class

FilterTest
Provides a test filter plugin for Views.

Namespace

Drupal\views_test_data\Plugin\views\filter

Code

public function query() {
  // Call the parent if this option is enabled.
  if ($this->options['test_enable']) {
    parent::query();
  }
}

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