public function Photos::themePhotos in Flickr 8
Theme Photos.
Parameters
array $photos: Photos.
string $size: Size.
int $caption: Caption On Off.
string $parent: Parent.
Return value
array Return theme array.
File
- src/
Service/ Photos.php, line 114
Class
- Photos
- Class Photos.
Namespace
Drupal\flickr\ServiceCode
public function themePhotos(array $photos, $size, $caption = 0, $parent = NULL) {
foreach ($photos as $photo) {
$themedPhotos[] = $this
->themePhoto($this->flickrApiPhotos
->photosGetInfo($photo['id']), $size, $caption, $parent);
}
return [
'#theme' => 'flickr_photos',
'#photos' => $themedPhotos,
'#attached' => [
'library' => [
'flickr/flickr.stylez',
],
],
];
}