function views_handler_field_comment::render_link

Same name in other branches
  1. 7.x-3.x modules/comment/views_handler_field_comment.inc \views_handler_field_comment::render_link()
1 call to views_handler_field_comment::render_link()
views_handler_field_comment::render in modules/comment/views_handler_field_comment.inc
Render the field.

File

modules/comment/views_handler_field_comment.inc, line 38

Class

views_handler_field_comment
Field handler to allow linking to a comment.

Code

function render_link($data, $values) {
    if (!empty($this->options['link_to_comment']) && $data !== NULL && $data !== '') {
        $this->options['alter']['make_link'] = TRUE;
        $this->options['alter']['path'] = "node/" . $this->get_value($values, 'nid');
        $this->options['alter']['fragment'] = "comment-" . $this->get_value($values, 'cid');
    }
    return $data;
}