1 date_views_filter_handler_simple.inc | date_views_filter_handler_simple::accept_exposed_input($input) |
Do some minor translation of the exposed input
Overrides views_handler_filter_date::accept_exposed_input
File
- core/
modules/ date/ views/ date_views_filter_handler_simple.inc, line 124 - A standard Views filter for a single date field, using Date API form selectors and sql handling.
Class
- date_views_filter_handler_simple
- @file A standard Views filter for a single date field, using Date API form selectors and sql handling.
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'] : '');
if (is_array($element_input) && isset($element_input['default_date'])) {
unset($element_input['default_date']);
}
if (is_array($element_input) && isset($element_input['default_to_date'])) {
unset($element_input['default_to_date']);
}
$input[$this->options['expose']['identifier']] = $element_input;
}
return parent::accept_exposed_input($input);
}