function views_handler_field_comment_link_delete::render_link

Overrides views_handler_field_comment_link::render_link

File

modules/comment/views_handler_field_comment_link_delete.inc, line 26

Class

views_handler_field_comment_link_delete
Field handler to present a link to delete a node.

Code

public function render_link($data, $values) {
    $text = !empty($this->options['text']) ? $this->options['text'] : t('delete');
    $cid = $this->get_value($values, 'cid');
    $this->options['alter']['make_link'] = TRUE;
    $this->options['alter']['path'] = "comment/" . $cid . "/delete";
    $this->options['alter']['query'] = drupal_get_destination();
    return $text;
}