function StringFilter::opEmpty

1 method overrides StringFilter::opEmpty()
Combine::opEmpty in core/modules/views/src/Plugin/views/filter/Combine.php

File

core/modules/views/src/Plugin/views/filter/StringFilter.php, line 445

Class

StringFilter
Basic textfield filter to handle string filtering commands.

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.