function workbench_moderation_handler_field_history_link::render_link in Workbench Moderation 7.3
Same name and namespace in other branches
- 7 includes/workbench_moderation_handler_field_history_link.inc \workbench_moderation_handler_field_history_link::render_link()
Overrides views_handler_field_node_link::render_link
File
- includes/
workbench_moderation_handler_field_history_link.inc, line 10 - Provides a link to Moderation History for Views.
Class
- workbench_moderation_handler_field_history_link
- @file Provides a link to Moderation History for Views.
Code
function render_link($data, $values) {
// ensure user has access to view moderation history for this node.
$node = node_load($this
->get_value($values, 'nid'));
if (!_workbench_moderation_access('view history', $node)) {
return;
}
$this->options['alter']['make_link'] = TRUE;
$this->options['alter']['path'] = "node/{$node->nid}/moderation";
$text = !empty($this->options['text']) ? $this->options['text'] : t('View moderation history');
return $text;
}