function GroupByNumeric::op_empty

Overrides Numeric::op_empty

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/filter/GroupByNumeric.php, line 49
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

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