You are here

protected function PhotosImageSetCover::renderLink in Album Photos 8.5

Same name and namespace in other branches
  1. 6.0.x src/Plugin/views/field/PhotosImageSetCover.php \Drupal\photos\Plugin\views\field\PhotosImageSetCover::renderLink()

Prepares the link to view a entity.

Parameters

\Drupal\views\ResultRow $row: A view result row.

Return value

string Returns a string for the link text.

Overrides LinkBase::renderLink

File

src/Plugin/views/field/PhotosImageSetCover.php, line 22

Class

PhotosImageSetCover
Field handler to present a link to set image as album cover.

Namespace

Drupal\photos\Plugin\views\field

Code

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