function i18nviews_handler_field_taxonomy_term_name::pre_render in Internationalization Views 7.3
Translate the taxonomy term name.
Parameters
$values:
Overrides views_handler_field::pre_render
File
- includes/
i18nviews_handler_field_taxonomy_term_name.inc, line 31
Class
- i18nviews_handler_field_taxonomy_term_name
- Field handler to provide simple renderer that allows linking to a taxonomy term.
Code
function pre_render(&$values) {
foreach ($values as $key => $value) {
if (isset($value->{$this->field_alias})) {
$term = new stdClass();
$term->tid = $this
->get_value($value, 'tid');
$term->vid = $this
->get_value($value, 'vid');
$term->name = $this
->get_value($value);
$values[$key]->{$this->field_alias . '_i18n'} = i18n_taxonomy_term_name($term);
}
}
}