You are here

public function Photos::themeCaption in Flickr 8

Theme Caption.

Parameters

array $photo: Photo.

string $size: Size.

int $caption: Caption.

Return value

array Return theme array.

1 call to Photos::themeCaption()
Photos::themePhoto in src/Service/Photos.php
Theme Photos.

File

src/Service/Photos.php, line 148

Class

Photos
Class Photos.

Namespace

Drupal\flickr\Service

Code

public function themeCaption(array $photo, $size, $caption) {
  return [
    '#theme' => 'flickr_photo_caption',
    '#caption' => $caption,
    '#caption_realname' => $photo['owner']['realname'],
    '#caption_title' => $photo['title']['_content'],
    '#caption_description' => $photo['description']['_content'],
    '#caption_dateuploaded' => $photo['dateuploaded'],
    '#style_name' => 'flickr-photo-' . $size,
    '#photo_size' => $size,
  ];
}