1 views_handler_field_node_link.inc views_handler_field_node_link::render_link($node, $values)

File

core/modules/node/views/views_handler_field_node_link.inc, line 59
Definition of views_handler_field_node_link.

Class

views_handler_field_node_link
Field handler to present a link to the node.

Code

function render_link($node, $values) {
  $options = &$this->options;

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