class i18nviews_handler_argument_term_language in Internationalization Views 6.3
Same name and namespace in other branches
- 6.2 includes/i18nviews_handler_argument_term_language.inc \i18nviews_handler_argument_term_language
Argument handler to accept a language.
Hierarchy
- class \i18nviews_handler_argument_term_language extends \views_handler_argument
Expanded class hierarchy of i18nviews_handler_argument_term_language
1 string reference to 'i18nviews_handler_argument_term_language'
- i18nviews_views_data_alter in includes/
i18nviews.views.inc - Implemenation of hook_views_data_alter().
File
- includes/
i18nviews_handler_argument_term_language.inc, line 6
View source
class i18nviews_handler_argument_term_language extends views_handler_argument {
function construct() {
parent::construct('language');
}
/**
* Override the behavior of summary_name(). Get the user friendly version
* of the language.
*/
function summary_name($data) {
return $this
->term_language($data->{$this->name_alias});
}
/**
* Override the behavior of title(). Get the user friendly version of the
* node type.
*/
function title() {
return $this
->term_language($this->argument);
}
function term_language($langcode) {
$languages = locale_language_list();
return isset($languages[$langcode]) ? $languages[$langcode] : t('Unknown language');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
i18nviews_handler_argument_term_language:: |
function | |||
i18nviews_handler_argument_term_language:: |
function | Override the behavior of summary_name(). Get the user friendly version of the language. | ||
i18nviews_handler_argument_term_language:: |
function | |||
i18nviews_handler_argument_term_language:: |
function | Override the behavior of title(). Get the user friendly version of the node type. |