You are here

public function FilterExceptionTest::query in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterExceptionTest.php \Drupal\views_test_data\Plugin\views\filter\FilterExceptionTest::query()
  2. 9 core/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterExceptionTest.php \Drupal\views_test_data\Plugin\views\filter\FilterExceptionTest::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/FilterExceptionTest.php, line 17

Class

FilterExceptionTest
Breaks the query with adding an invalid where expression.

Namespace

Drupal\views_test_data\Plugin\views\filter

Code

public function query() {
  $this->query
    ->addWhereExpression(NULL, "syntax error");
}