function FilterPluginBase::query
Same name in other branches
- 8.9.x core/modules/views/src/Plugin/views/filter/FilterPluginBase.php \Drupal\views\Plugin\views\filter\FilterPluginBase::query()
- 10 core/modules/views/src/Plugin/views/filter/FilterPluginBase.php \Drupal\views\Plugin\views\filter\FilterPluginBase::query()
- 11.x core/modules/views/src/Plugin/views/filter/FilterPluginBase.php \Drupal\views\Plugin\views\filter\FilterPluginBase::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 HandlerBase::query
2 calls to FilterPluginBase::query()
- FilterTest::query in core/
modules/ views/ tests/ modules/ views_test_data/ src/ Plugin/ views/ filter/ FilterTest.php - Add this filter to the query.
- ViewsTestCacheContextFilter::query in core/
modules/ views/ tests/ modules/ views_test_data/ src/ Plugin/ views/ filter/ ViewsTestCacheContextFilter.php - Add this filter to the query.
15 methods override FilterPluginBase::query()
- Access::query in core/
modules/ node/ src/ Plugin/ views/ filter/ Access.php - See _node_access_where_sql() for a non-views query based implementation.
- BooleanOperator::query in core/
modules/ views/ src/ Plugin/ views/ filter/ BooleanOperator.php - Add this filter to the query.
- FilterExceptionTest::query in core/
modules/ views/ tests/ modules/ views_test_data/ src/ Plugin/ views/ filter/ FilterExceptionTest.php - Add this filter to the query.
- FilterTest::query in core/
modules/ views/ tests/ modules/ views_test_data/ src/ Plugin/ views/ filter/ FilterTest.php - Add this filter to the query.
- HistoryUserTimestamp::query in core/
modules/ history/ src/ Plugin/ views/ filter/ HistoryUserTimestamp.php - Add this filter to the query.
File
-
core/
modules/ views/ src/ Plugin/ views/ filter/ FilterPluginBase.php, line 1616
Class
- FilterPluginBase
- Base class for Views filters handler plugins.
Namespace
Drupal\views\Plugin\views\filterCode
public function query() {
$this->ensureMyTable();
$this->query
->addWhere($this->options['group'], "{$this->tableAlias}.{$this->realField}", $this->value, $this->operator);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.