function template_preprocess_imagezoom_gallery in Image Zoom 8.2
Same name and namespace in other branches
- 8.3 imagezoom.module \template_preprocess_imagezoom_gallery()
- 7.2 modules/imagezoom_gallery/imagezoom_gallery.module \template_preprocess_imagezoom_gallery()
Preprocess function for imagezoom_gallery.
File
- modules/
imagezoom_gallery/ imagezoom_gallery.module, line 43 - Provides a gallery formatter for the Image Zoom module.
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'],
];
}
}
}