function LinkReply::render_link

Overrides Link::render_link

File

drupal/core/modules/comment/lib/Drupal/comment/Plugin/views/field/LinkReply.php, line 26
Definition of Drupal\comment\Plugin\views\field\LinkReply.

Class

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

Namespace

Drupal\comment\Plugin\views\field

Code

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