public function SearchApiViewsHandlerFilterNumeric::operator_options in Search API 7
Provide a list of options for the operator form.
Overrides SearchApiViewsHandlerFilter::operator_options
1 call to SearchApiViewsHandlerFilterNumeric::operator_options()
- SearchApiViewsHandlerFilterNumeric::value_form in contrib/
search_api_views/ includes/ handler_filter_numeric.inc - Provides a form for setting the filter value.
File
- contrib/
search_api_views/ includes/ handler_filter_numeric.inc, line 41 - Contains SearchApiViewsHandlerFilterNumeric.
Class
- SearchApiViewsHandlerFilterNumeric
- Views filter handler class for handling numeric and "string" fields.
Code
public function operator_options() {
$operators = parent::operator_options();
$index = search_api_index_load(substr($this->table, 17));
$server = NULL;
try {
if ($index) {
$server = $index
->server();
}
} catch (SearchApiException $e) {
// Ignore.
}
if ($server && $server
->supportsFeature('search_api_between')) {
$operators += array(
'between' => t('Is between'),
'not between' => t('Is not between'),
);
}
return $operators;
}