public function BooleanOperator::query in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views/src/Plugin/views/filter/BooleanOperator.php \Drupal\views\Plugin\views\filter\BooleanOperator::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
3 methods override BooleanOperator::query()
- BooleanOperatorString::query in core/
modules/ views/ src/ Plugin/ views/ filter/ BooleanOperatorString.php - Add this filter to the query.
- Current::query in core/
modules/ user/ src/ Plugin/ views/ filter/ Current.php - Add this filter to the query.
- FilterBooleanOperatorDefaultTest::query in core/
modules/ views/ tests/ modules/ views_test_data/ src/ Plugin/ views/ filter/ FilterBooleanOperatorDefaultTest.php - Add this filter to the query.
File
- core/
modules/ views/ src/ Plugin/ views/ filter/ BooleanOperator.php, line 214
Class
- BooleanOperator
- Simple filter to handle matching of boolean values
Namespace
Drupal\views\Plugin\views\filterCode
public function query() {
$this
->ensureMyTable();
$field = "{$this->tableAlias}.{$this->realField}";
$info = $this
->operators();
if (!empty($info[$this->operator]['method'])) {
call_user_func([
$this,
$info[$this->operator]['method'],
], $field, $info[$this->operator]['query_operator']);
}
}