function Link::render_link

Same name in this branch
  1. 8.x drupal/core/modules/node/lib/Drupal/node/Plugin/views/field/Link.php \Drupal\node\Plugin\views\field\Link::render_link()
  2. 8.x drupal/core/modules/user/lib/Drupal/user/Plugin/views/field/Link.php \Drupal\user\Plugin\views\field\Link::render_link()
  3. 8.x drupal/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Link.php \Drupal\comment\Plugin\views\field\Link::render_link()
1 call to Link::render_link()
Link::render in drupal/core/modules/node/lib/Drupal/node/Plugin/views/field/Link.php
Render the field.
3 methods override Link::render_link()
LinkDelete::render_link in drupal/core/modules/node/lib/Drupal/node/Plugin/views/field/LinkDelete.php
Renders the link.
LinkEdit::render_link in drupal/core/modules/node/lib/Drupal/node/Plugin/views/field/LinkEdit.php
Renders the link.
RevisionLink::render_link in drupal/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLink.php

File

drupal/core/modules/node/lib/Drupal/node/Plugin/views/field/Link.php, line 54
Definition of Drupal\node\Plugin\views\field\Link.

Class

Link
Field handler to present a link to the node.

Namespace

Drupal\node\Plugin\views\field

Code

function render_link($node, $values) {
  if (node_access('view', $node)) {
    $this->options['alter']['make_link'] = TRUE;
    $this->options['alter']['path'] = "node/{$node->nid}";
    $text = !empty($this->options['text']) ? $this->options['text'] : t('view');
    return $text;
  }
}