You are here

function GroupByNumeric::op_empty in Views (for Drupal 7) 8.3

Overrides Numeric::op_empty

File

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}");
}