You are here

protected function InOperator::opEmpty in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/filter/InOperator.php \Drupal\views\Plugin\views\filter\InOperator::opEmpty()

File

core/modules/views/src/Plugin/views/filter/InOperator.php, line 405

Class

InOperator
Simple filter to handle matching of multiple options selectable via checkboxes.

Namespace

Drupal\views\Plugin\views\filter

Code

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