19 declare(strict_types=1);
41 $factory = $DIC->ui()->factory();
43 $image = $factory->image()->responsive(
'assets/ui-examples/images/Image/mountains.jpg',
'Nice view on some mountains');
44 $page = $factory->modal()->lightboxImagePage($image,
'Mountains',
'Image source: https://stocksnap.io, Creative Commons CC0 license');
45 $image2 = $factory->image()->responsive(
'assets/ui-examples/images/Image/sanfrancisco.jpg',
'The golden gate bridge');
46 $page2 = $factory->modal()->lightboxImagePage($image2,
'San Francisco',
'Image source: https://stocksnap.io, Creative Commons CC0 license');
47 $image3 = $factory->image()->responsive(
'assets/ui-examples/images/Image/ski.jpg',
'Skiing');
48 $page3 = $factory->modal()->lightboxImagePage($image3,
'Ski Fun',
'Image source: https://stocksnap.io, Creative Commons CC0 license');
49 $modal = $factory->modal()->lightbox([$page, $page2, $page3]);
50 $button = $factory->button()->standard(
'Show some fancy images',
'')
51 ->withOnClick($modal->getShowSignal());
53 return $renderer->render([$button, $modal]);
show_multiple_images()
description: > Example for rendering a lightbox image page modal with multiple images.