You are here

public function views_handler_filter_in_operator::op_empty in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 handlers/views_handler_filter_in_operator.inc \views_handler_filter_in_operator::op_empty()
  2. 6.2 handlers/views_handler_filter_in_operator.inc \views_handler_filter_in_operator::op_empty()

File

handlers/views_handler_filter_in_operator.inc, line 414
Definition of views_handler_filter_in_operator.

Class

views_handler_filter_in_operator
Simple filter to handle matching of multiple options using checkboxes.

Code

public function op_empty() {
  $this
    ->ensure_my_table();
  if ($this->operator == 'empty') {
    $operator = "IS NULL";
  }
  else {
    $operator = "IS NOT NULL";
  }
  $this->query
    ->add_where($this->options['group'], "{$this->table_alias}.{$this->real_field}", NULL, $operator);
}