function mvf_handler_filter_mvf::accept_exposed_input in Measured Value Field 7
Since our filter operates on 2 form elements we can't use parent's method.
Overrides views_handler_filter_numeric::accept_exposed_input
File
- views/
mvf_handler_filter_mvf.inc, line 153
Class
- mvf_handler_filter_mvf
- Base Views Filter Handler for field types defined in MVF module.
Code
function accept_exposed_input($input) {
// Converting single value into array('value' => $value), as the rest of
// this code expects it reside there.
$value =& $input[$this->options['expose']['identifier']];
$info = $this
->operators();
$operator = $info[$this->operator];
if ($operator['values'] == 1 && in_array('value', $operator['required subvalues'])) {
$value = array(
'value' => $value,
);
}
$accept = parent::accept_exposed_input($input);
if (!$accept) {
return FALSE;
}
foreach ($operator['required subvalues'] as $required_subvalue) {
if (module_invoke('mvf', 'field_is_empty', $value[$required_subvalue], $this->options['field_definition'])) {
return FALSE;
}
}
return $accept;
}