You are here

function matrix_handler_filter::op_empty in Matrix field 8.2

Same name in this branch
  1. 8.2 views/matrix_handler_filter.inc \matrix_handler_filter::op_empty()
  2. 8.2 src/matrix_handler_filter.php \Drupal\matrix\matrix_handler_filter::op_empty()
Same name and namespace in other branches
  1. 7.2 views/matrix_handler_filter.inc \matrix_handler_filter::op_empty()

File

views/matrix_handler_filter.inc, line 314

Class

matrix_handler_filter
Basic textfield filter to handle string filtering commands including equality, like, not like, etc.

Code

function op_empty($field) {
  if ($this->operator == 'empty') {
    $operator = "=";
  }
  else {
    $operator = "<>";
  }
  list($row, $col, $value) = explode('_____', $this->value);
  $this->query
    ->add_where($this->options['group'], $field . 'row', $row, '=');
  $this->query
    ->add_where($this->options['group'], $field . 'col', $col, '=');
  $this->query
    ->add_where($this->options['group'], $field . 'value', NULL, $operator);
}