You are here

public function FilterPluginBase::query in Views (for Drupal 7) 8.3

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 PluginBase::query

1 call to FilterPluginBase::query()
FilterTest::query in tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/filter/FilterTest.php
Overrides Drupal\views\Plugin\views\filter\FilterPluginBase::query().
13 methods override FilterPluginBase::query()
Access::query in lib/Views/node/Plugin/views/filter/Access.php
See _node_access_where_sql() for a non-views query based implementation.
BooleanOperator::query in lib/Drupal/views/Plugin/views/filter/BooleanOperator.php
Add this filter to the query.
Broken::query in lib/Drupal/views/Plugin/views/filter/Broken.php
Add this filter to the query.
FilterTest::query in tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/filter/FilterTest.php
Overrides Drupal\views\Plugin\views\filter\FilterPluginBase::query().
HistoryUserTimestamp::query in lib/Views/node/Plugin/views/filter/HistoryUserTimestamp.php
Add this filter to the query.

... See full list

File

lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php, line 1371
Definition of Drupal\views\Plugin\views\filter\FilterPluginBase.

Class

FilterPluginBase
Base class for filters.

Namespace

Drupal\views\Plugin\views\filter

Code

public function query() {
  $this
    ->ensureMyTable();
  $this->query
    ->add_where($this->options['group'], "{$this->tableAlias}.{$this->realField}", $this->value, $this->operator);
}