You are here

function date_views_filter_handler_simple::accept_exposed_input in Date 8

Same name and namespace in other branches
  1. 7.3 date_views/includes/date_views_filter_handler_simple.inc \date_views_filter_handler_simple::accept_exposed_input()
  2. 7.2 date_views/includes/date_views_filter_handler_simple.inc \date_views_filter_handler_simple::accept_exposed_input()

File

date_views/includes/date_views_filter_handler_simple.inc, line 104
A standard Views filter for a single date field, using Date API form selectors and sql handling.

Class

date_views_filter_handler_simple

Code

function accept_exposed_input($input) {
  if (!empty($this->options['exposed'])) {
    $element_input = $input[$this->options['expose']['identifier']];
    $element_input['value'] = $this
      ->get_filter_value('value', !empty($element_input['value']) ? $element_input['value'] : '');
    $element_input['min'] = $this
      ->get_filter_value('min', !empty($element_input['min']) ? $element_input['min'] : '');
    $element_input['max'] = $this
      ->get_filter_value('max', !empty($element_input['max']) ? $element_input['max'] : '');
    unset($element_input['default_date']);
    unset($element_input['default_to_date']);
    $input[$this->options['expose']['identifier']] = $element_input;
  }
  return parent::accept_exposed_input($input);
}