protected function SearchApiViewsHandlerFilterNumeric::normalizeValue in Search API 7
Sets $this->value to an array of options as defined by the filter.
See also
SearchApiViewsHandlerFilterNumeric::option_definition()
3 calls to SearchApiViewsHandlerFilterNumeric::normalizeValue()
- SearchApiViewsHandlerFilterDate::query in contrib/
search_api_views/ includes/ handler_filter_date.inc - Add this filter to the query.
- SearchApiViewsHandlerFilterNumeric::init in contrib/
search_api_views/ includes/ handler_filter_numeric.inc - Provide some extra help to get the operator/value easier to use.
- SearchApiViewsHandlerFilterNumeric::query in contrib/
search_api_views/ includes/ handler_filter_numeric.inc - Add this filter to the query.
File
- contrib/
search_api_views/ includes/ handler_filter_numeric.inc, line 233 - Contains SearchApiViewsHandlerFilterNumeric.
Class
- SearchApiViewsHandlerFilterNumeric
- Views filter handler class for handling numeric and "string" fields.
Code
protected function normalizeValue() {
$value = $this->value;
if (is_array($value) && isset($value[0])) {
$value = $value[0];
}
if (!is_array($value)) {
$value = array(
'value' => $value,
);
}
$this->value = array(
'value' => isset($value['value']) ? $value['value'] : '',
'min' => isset($value['min']) ? $value['min'] : '',
'max' => isset($value['max']) ? $value['max'] : '',
);
}