You are here

function LinkReply::render_link in Views (for Drupal 7) 8.3

Overrides Link::render_link

File

lib/Views/comment/Plugin/views/field/LinkReply.php, line 29
Definition of Views\comment\Plugin\views\field\LinkReply.

Class

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

Namespace

Views\comment\Plugin\views\field

Code

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