protected function Numeric::opEmpty

1 method overrides Numeric::opEmpty()
GroupByNumeric::opEmpty 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 267
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

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