You are here

protected function PhotosImageSetCover::getUrlInfo 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::getUrlInfo()

Returns the URI elements of the link.

Parameters

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

Return value

\Drupal\Core\Url The URI elements of the link.

Overrides LinkBase::getUrlInfo

File

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

Class

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

Namespace

Drupal\photos\Plugin\views\field

Code

protected function getUrlInfo(ResultRow $row) {
  $entity = $this
    ->getEntity($row);
  return Url::fromRoute('photos.album.update.cover', [
    'node' => $entity
      ->getAlbumId(),
    'photos_image' => $entity
      ->id(),
  ])
    ->setAbsolute($this->options['absolute']);
}