You are here

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

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

Overrides views_handler_filter_numeric::op_empty

File

handlers/views_handler_filter_group_by_numeric.inc, line 54
Definition of views_handler_filter_group_by_numeric.

Class

views_handler_filter_group_by_numeric
Simple filter to handle greater than/less than filters

Code

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