function location_views_handler_arg_country in Location 5.3
Same name and namespace in other branches
- 5 contrib/location_views/location_views.module \location_views_handler_arg_country()
1 string reference to 'location_views_handler_arg_country'
- location_views_arguments in contrib/
location_views/ location_views.module
File
- contrib/
location_views/ location_views.module, line 820 - Views-enables the location module.
Code
function location_views_handler_arg_country($op, &$query, $argtype, $arg = '') {
switch ($op) {
case 'link':
return l($query->country == t('unknown') ? t('unknown') : location_country_name($query->country), "{$arg}/{$query->country}");
case 'title':
global $_location_views_country;
$_location_views_country = $query;
return $query == t('unknown') ? t('unknown') : location_country_name($query);
case 'filter':
// Stash the arg for use by the province arg.
$query->_location_country_arg = $arg;
default:
return location_views_handler_any($op, $query, $argtype, $arg, 'node', 'country');
}
}