function location_handler_filter_location_country::reduce_value_options in Location 7.5
Same name and namespace in other branches
- 6.3 handlers/location_handler_filter_location_country.inc \location_handler_filter_location_country::reduce_value_options()
- 7.3 handlers/location_handler_filter_location_country.inc \location_handler_filter_location_country::reduce_value_options()
When using exposed filters, we may be required to reduce the set.
Overrides views_handler_filter_in_operator::reduce_value_options
1 call to location_handler_filter_location_country::reduce_value_options()
- location_handler_filter_location_country::value_form in handlers/
location_handler_filter_location_country.inc - Provide widgets for filtering by country.
File
- handlers/
location_handler_filter_location_country.inc, line 81
Class
- location_handler_filter_location_country
- Filter on country.
Code
function reduce_value_options($input = NULL) {
if (empty($this->options)) {
$this
->get_value_options();
}
if (!empty($this->options['expose']['reduce']) && !empty($this->options['value'])) {
$reduced_options = array();
foreach ($this->options['value'] as $value) {
$reduced_options[$value] = $this->value_options[$value];
}
return $reduced_options;
}
return $this
->get_value_options();
}