function views_handler_argument_countries_country::title_query in Countries 8
Same name and namespace in other branches
- 7.2 views/views_handler_argument_countries_country.inc \views_handler_argument_countries_country::title_query()
Override the behavior of title_query() based on the user selected options.
File
- views/
views_handler_argument_countries_country.inc, line 13 - Argument handler for countries properties.
Class
- views_handler_argument_countries_country
- @file Argument handler for countries properties.
Code
function title_query() {
$titles = array();
foreach ($this->value as $country_property) {
if ($country = countries_country_lookup($country_property, $this->real_field)) {
$property = empty($this->options['title_property']) ? 'name' : $this->options['title_property'];
if ($label = country_property($country, $property)) {
$titles[] = $label;
}
}
}
return $titles;
}