public function Thumbnails::viewPager in Field Slideshow 8.3
Function render pager.
Parameters
\Drupal\Core\Field\FieldItemListInterface $items: List of items.
Return value
array Rendered array.
Overrides FieldSlideshowPagerPluginBase::viewPager
File
- src/
Plugin/ FieldSlideshowPager/ Thumbnails.php, line 28
Class
- Thumbnails
- Plugin implementation of the field_slideshow_pager.
Namespace
Drupal\field_slideshow\Plugin\FieldSlideshowPagerCode
public function viewPager(FieldItemListInterface $items) {
$output = [];
foreach ($items as $delta => $item) {
$output[$delta] = [
'#theme' => 'image_style',
'#height' => '',
'#width' => '',
'#style_name' => 'thumbnail',
'#uri' => $item->entity
->getFileUri(),
];
}
return $output;
}