function EntityLink::renderLink

Same name and namespace in other branches
  1. 11.x core/modules/views/src/Plugin/views/field/EntityLink.php \Drupal\views\Plugin\views\field\EntityLink::renderLink()
  2. 10 core/modules/views/src/Plugin/views/field/EntityLink.php \Drupal\views\Plugin\views\field\EntityLink::renderLink()
  3. 8.9.x core/modules/views/src/Plugin/views/field/EntityLink.php \Drupal\views\Plugin\views\field\EntityLink::renderLink()

File

core/modules/views/src/Plugin/views/field/EntityLink.php, line 27

Class

EntityLink
Field handler to present a link to an entity.

Namespace

Drupal\views\Plugin\views\field

Code

protected function renderLink(ResultRow $row) {
  if ($this->options['output_url_as_text']) {
    return $this->getUrlInfo($row)
      ->toString();
  }
  return parent::renderLink($row);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.