function Numeric::op_empty

1 method overrides Numeric::op_empty()
GroupByNumeric::op_empty in drupal/core/modules/views/lib/Drupal/views/Plugin/views/filter/GroupByNumeric.php

File

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

Class

Numeric
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_where($this->options['group'], $field, NULL, $operator);
}