You are here

function hs_taxonomy_views_handler_filter_term_node_tid::accept_exposed_input in Hierarchical Select 6.3

Take input from exposed filters and assign to this handler, if necessary.

File

modules/hs_taxonomy_views_handler_filter_term_node_tid.inc, line 222
This file defines a new filter handler for using Hierarchical Select in exposed Taxonomy term filters.

Class

hs_taxonomy_views_handler_filter_term_node_tid
@file This file defines a new filter handler for using Hierarchical Select in exposed Taxonomy term filters.

Code

function accept_exposed_input($input) {

  // No need to override the parrent class' accept_exposed_input() method.
  // It returns TRUE (and therefor results in an altered query and therefor
  // filtered view) whenever the filter is not exposed or when a new value
  // was validated.
  // This method checks if $this->validated_exposed_input is set, and if so,
  // results are filtered by those values.
  $rc = parent::accept_exposed_input($input);
  if ($this
    ->select_type_is_hierarchical_select() && !is_array($this->value)) {
    $this->value = array(
      $this->value,
    );
  }
  return $rc;
}