You are here

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

Same name in this branch
  1. 8.3 lib/Views/node/Plugin/views/field/Link.php \Views\node\Plugin\views\field\Link::render_link()
  2. 8.3 lib/Views/user/Plugin/views/field/Link.php \Views\user\Plugin\views\field\Link::render_link()
  3. 8.3 lib/Views/comment/Plugin/views/field/Link.php \Views\comment\Plugin\views\field\Link::render_link()
1 call to Link::render_link()
Link::render in lib/Views/node/Plugin/views/field/Link.php
Render the field.
4 methods override Link::render_link()
LinkDelete::render_link in lib/Views/node/Plugin/views/field/LinkDelete.php
Renders the link.
LinkEdit::render_link in lib/Views/node/Plugin/views/field/LinkEdit.php
Renders the link.
NodeLinkTranslate::render_link in lib/Views/translation/Plugin/views/field/NodeLinkTranslate.php
RevisionLink::render_link in lib/Views/node/Plugin/views/field/RevisionLink.php

File

lib/Views/node/Plugin/views/field/Link.php, line 52
Definition of Views\node\Plugin\views\field\Link.

Class

Link
Field handler to present a link to the node.

Namespace

Views\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;
  }
}