You are here

public function views_handler_filter_selective::query in Views Selective Filters 7

Add this filter to the query.

Due to the nature of fapi, the value and the operator have an unintended level of indirection. You will find them in $this->operator and $this->value respectively.

Overrides views_handler_filter_in_operator::query

File

./views_handler_filter_selective.inc, line 207
Views Filter Selective Handler Overrides.

Class

views_handler_filter_selective
Views filter handler for selective values.

Code

public function query() {

  // If this view was constructed to obtain the selective values for this
  // handler, the handler should not add any constraints itself.
  if (isset($this->view->selective_handler_signature) && $this
    ->getSignature() == $this->view->selective_handler_signature) {
    return;
  }

  // Decode the values to restore special chars.
  if (is_array($this->value)) {
    $this->value = array_map('urldecode', $this->value);
  }
  elseif (is_string($this->value)) {
    $this->value = urldecode($this->value);
  }
  parent::query();
}