You are here

class i18nviews_handler_field_term_description in Internationalization Views 6.2

Same name and namespace in other branches
  1. 6.3 includes/i18nviews_handler_field_term_description.inc \i18nviews_handler_field_term_description

Field handler to provide simple renderer that allows linking to a taxonomy term.

Hierarchy

Expanded class hierarchy of i18nviews_handler_field_term_description

1 string reference to 'i18nviews_handler_field_term_description'
i18nviews_views_data_alter in includes/i18nviews.views.inc
Implemenation of hook_views_data_alter().

File

includes/i18nviews_handler_field_term_description.inc, line 7

View source
class i18nviews_handler_field_term_description extends views_handler_field_markup {
  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 . ':description', $value->{$this->field_alias});
      }
    }
  }

}

Members