You are here

function views_handler_filter_tag_font_tid::accept_exposed_input in @font-your-face 7

Same name and namespace in other branches
  1. 6.2 views/views_handler_filter_tag_font_tid.inc \views_handler_filter_tag_font_tid::accept_exposed_input()
  2. 7.2 modules/fontyourface_ui/views/views_handler_filter_tag_font_tid.inc \views_handler_filter_tag_font_tid::accept_exposed_input()

Check to see if input from the exposed filters should change the behavior.

Overrides views_handler_filter_in_operator::accept_exposed_input

File

views/views_handler_filter_tag_font_tid.inc, line 152
Views handler.

Class

views_handler_filter_tag_font_tid
Filter by tag id. Largely copied from views_handler_filter_term_node_tid.inc

Code

function accept_exposed_input($input) {
  if (empty($this->options['exposed'])) {
    return TRUE;
  }

  // If it's optional and there's no value don't bother filtering.
  if ($this->options['expose']['optional'] && empty($this->validated_exposed_input)) {
    return FALSE;
  }
  $rc = parent::accept_exposed_input($input);
  if ($rc) {

    // If we have previously validated input, override.
    if (isset($this->validated_exposed_input)) {
      $this->value = $this->validated_exposed_input;
    }

    // if
  }

  // if
  return $rc;
}