protected function GroupByNumeric::opEmpty

Overrides Numeric::opEmpty

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/filter/GroupByNumeric.php, line 47
Definition of Drupal\views\Plugin\views\filter\GroupByNumeric.

Class

GroupByNumeric
Simple filter to handle greater than/less than filters

Namespace

Drupal\views\Plugin\views\filter

Code

protected function opEmpty($field) {
  if ($this->operator == 'empty') {
    $operator = "IS NULL";
  }
  else {
    $operator = "IS NOT NULL";
  }
  $this->query
    ->addHavingExpression($this->options['group'], "{$field} {$operator}");
}