function getlocations_fields_handler_filter_country::reduce_value_options in Get Locations 7.2
Same name and namespace in other branches
- 7 modules/getlocations_fields/handlers/getlocations_fields_handler_filter_country.inc \getlocations_fields_handler_filter_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 getlocations_fields_handler_filter_country::reduce_value_options()
- getlocations_fields_handler_filter_country::value_form in modules/
getlocations_fields/ handlers/ getlocations_fields_handler_filter_country.inc - Provide widgets for filtering by country.
File
- modules/
getlocations_fields/ handlers/ getlocations_fields_handler_filter_country.inc, line 75 - getlocations_fields_handler_filter_country.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Class
- getlocations_fields_handler_filter_country
- @file getlocations_fields_handler_filter_country.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
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();
}