You are here

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

1 call to TitleLink::render_link()
TitleLink::render in lib/Views/aggregator/Plugin/views/field/TitleLink.php
Render the field.

File

lib/Views/aggregator/Plugin/views/field/TitleLink.php, line 61
Definition of Views\aggregator\Plugin\views\field\TitleLink.

Class

TitleLink
Field handler that turns an item's title into a clickable link to the original source article.

Namespace

Views\aggregator\Plugin\views\field

Code

function render_link($data, $values) {
  $link = $this
    ->get_value($values, 'link');
  if (!empty($this->options['display_as_link'])) {
    $this->options['alter']['make_link'] = TRUE;
    $this->options['alter']['path'] = $link;
    $this->options['alter']['html'] = TRUE;
  }
  return $data;
}