function i18nviews_handler_field_taxonomy_term_description::pre_render in Internationalization Views 7.3
Parameters
$values:
Overrides views_handler_field::pre_render
File
- includes/
i18nviews_handler_field_taxonomy_term_description.inc, line 33
Class
- i18nviews_handler_field_taxonomy_term_description
- Field handler to provide simple renderer that allows linking to a taxonomy term.
Code
function pre_render(&$values) {
$tids = array();
foreach ($values as $key => $value) {
if (isset($value->{$this->field_alias})) {
$tids[] = $this
->get_value($value, 'tid');
}
}
$terms = taxonomy_term_load_multiple($tids);
$terms = i18n_taxonomy_localize_terms($terms);
foreach ($values as $key => $value) {
if (isset($value->{$this->field_alias})) {
$tid = $this
->get_value($value, 'tid');
$values[$key]->{$this->field_alias . '_i18n'} = $terms[$tid]->description;
}
}
}