Render whatever the data is as a link to the node.
Data should be made XSS safe prior to calling this function.
Overrides Node::render_link
function render_link($data, $values) {
if (!empty($this->options['link_to_node_revision']) && $data !== NULL && $data !== '') {
$this->options['alter']['make_link'] = TRUE;
$nid = $this
->getValue($values, 'nid');
$vid = $this
->getValue($values, 'vid');
$this->options['alter']['path'] = "node/" . $nid . '/revisions/' . $vid . '/view';
if (module_exists('translation')) {
$langcode = $this
->getValue($values, 'langcode');
$languages = language_list();
if (isset($languages[$langcode])) {
$this->options['alter']['langcode'] = $languages[$langcode];
}
}
}
else {
return parent::render_link($data, $values);
}
return $data;
}