You are here

function Ip2LongFilter::opEmpty in IP address manager 8.2

Overrides NumericFilter::opEmpty

File

src/Plugin/views/filter/Ip2LongFilter.php, line 36
Contains \Drupal\ip\Plugin\views\filter\Ip2LongFilter.

Class

Ip2LongFilter
Filter to handle greater than/less than ip2long filters

Namespace

Drupal\ip\Plugin\views\filter

Code

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