function template_preprocess_imagezoom_gallery in Image Zoom 8.3
Same name and namespace in other branches
- 8.2 modules/imagezoom_gallery/imagezoom_gallery.module \template_preprocess_imagezoom_gallery()
- 7.2 modules/imagezoom_gallery/imagezoom_gallery.module \template_preprocess_imagezoom_gallery()
Preprocess function for imagezoom_gallery.
File
- ./
imagezoom.module, line 88 - Provides an Image Zoom field formatter for Image fields.
Code
function template_preprocess_imagezoom_gallery(&$variables) {
if ($items = $variables['items']) {
$variables['image'] = [
'#theme' => 'imagezoom_image',
'#item' => $items[0],
'#display_style' => $variables['display_style'],
'#zoom_style' => $variables['zoom_style'],
'#settings' => $variables['settings'],
];
$variables['thumbs'] = [];
foreach ($items as $item) {
$variables['thumbs'][] = [
'#theme' => 'imagezoom_thumb',
'#item' => $item,
'#display_style' => $variables['display_style'],
'#thumb_style' => $variables['thumb_style'],
'#zoom_style' => $variables['zoom_style'],
'#settings' => $variables['settings'],
];
}
}
}