public function location_handler_argument_location_province::title in Location 7.3
Same name and namespace in other branches
- 6.3 handlers/location_handler_argument_location_province.inc \location_handler_argument_location_province::title()
- 7.5 handlers/location_handler_argument_location_province.inc \location_handler_argument_location_province::title()
- 7.4 handlers/location_handler_argument_location_province.inc \location_handler_argument_location_province::title()
Override the behavior of title(). Get the province name.
Overrides views_handler_argument::title
File
- handlers/
location_handler_argument_location_province.inc, line 66 - Argument handler to accept a province code or name.
Class
Code
public function title() {
if (isset($this->view->argument['country'])) {
$country = $this->view->argument['country']->argument;
}
else {
$country = variable_get('location_default_country', 'us');
}
$title = "";
$values = explode(',', $this->argument);
foreach ($values as $value) {
$title .= location_province_name($country, $value) . ", ";
}
return substr($title, 0, -2);
}