You are here

i18nviews_handler_field_taxonomy.inc in Internationalization Views 6.3

Same filename and directory in other branches
  1. 6.2 includes/i18nviews_handler_field_taxonomy.inc

File

includes/i18nviews_handler_field_taxonomy.inc
View source
<?php

/**
 * Field handler to provide simple renderer that allows linking to a taxonomy
 * term.
 */
class i18nviews_handler_field_taxonomy extends views_handler_field_taxonomy {
  function construct() {
    parent::construct();
    $this->additional_fields['tid'] = 'tid';
  }
  function pre_render($values) {
    foreach ($values as $key => $value) {
      if (isset($value->{$this->field_alias})) {
        $tid = $value->{$this->aliases['tid']};
        $values[$key]->{$this->field_alias} = tt('taxonomy:term:' . $tid . ':name', $value->{$this->field_alias});
      }
    }
  }

}

Classes

Namesort descending Description
i18nviews_handler_field_taxonomy Field handler to provide simple renderer that allows linking to a taxonomy term.