Render whatever the data is as a link to the taxonomy.
Data should be made XSS safe prior to calling this function.
function render_link($data, $values) {
$tid = $this
->getValue($values, 'tid');
if (!empty($this->options['link_to_taxonomy']) && !empty($tid) && $data !== NULL && $data !== '') {
$term = entity_create('taxonomy_term', array(
'tid' => $tid,
'vid' => $this
->getValue($values, 'vid'),
));
$this->options['alter']['make_link'] = TRUE;
$uri = $term
->uri();
$this->options['alter']['path'] = $uri['path'];
}
if (!empty($this->options['convert_spaces'])) {
$data = str_replace(' ', '-', $data);
}
return $data;
}