You are here

function slide_with_style_handler_filter_numeric::accept_exposed_input in Select with Style 7

Do some minor translation of the exposed input.

Overrides views_handler_filter_numeric::accept_exposed_input

File

slide_with_style/views/slide_with_style_handler_filter_numeric.inc, line 65
slide_with_style_handle_filter_numeric.inc

Class

slide_with_style_handler_filter_numeric
@file slide_with_style_handle_filter_numeric.inc

Code

function accept_exposed_input($input) {
  if (($this->operator == 'between' || $this->operator == 'not between') && !empty($this->options['id'])) {
    $field_id = $this->options['id'];
    $min_max = explode('--', is_array($input[$field_id]) ? reset($input[$field_id]) : $input[$field_id]);
    $min = reset($min_max);
    $max = next($min_max);
    $input[$field_id] = array(
      'min' => $min,
      'max' => $max === FALSE ? $min : $max,
    );
  }
  return parent::accept_exposed_input($input);
}