function GroupByNumeric::opEmpty
Overrides NumericFilter::opEmpty
File
-
core/
modules/ views/ src/ Plugin/ views/ filter/ GroupByNumeric.php, line 42
Class
- GroupByNumeric
- Simple filter to handle greater than/less than filters.
Namespace
Drupal\views\Plugin\views\filterCode
protected function opEmpty($field) {
if ($this->operator == 'empty') {
$operator = "IS NULL";
}
else {
$operator = "IS NOT NULL";
}
$this->query
->addHavingExpression($this->options['group'], "{$field} {$operator}");
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.