You are here

function String::op_empty in Views (for Drupal 7) 8.3

1 method overrides String::op_empty()
Combine::op_empty in lib/Drupal/views/Plugin/views/filter/Combine.php

File

lib/Drupal/views/Plugin/views/filter/String.php, line 340
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

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