protected function String::opEmpty

1 method overrides String::opEmpty()
Combine::opEmpty in drupal/core/modules/views/lib/Drupal/views/Plugin/views/filter/Combine.php

File

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

Class

String
Basic textfield filter to handle string filtering commands including equality, like, not like, etc.

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