ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
show_multiple_images.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
23 {
24  global $DIC;
25  $factory = $DIC->ui()->factory();
26  $renderer = $DIC->ui()->renderer();
27  $image = $factory->image()->responsive('assets/ui-examples/images/Image/mountains.jpg', 'Nice view on some mountains');
28  $page = $factory->modal()->lightboxImagePage($image, 'Mountains', 'Image source: https://stocksnap.io, Creative Commons CC0 license');
29  $image2 = $factory->image()->responsive('assets/ui-examples/images/Image/sanfrancisco.jpg', 'The golden gate bridge');
30  $page2 = $factory->modal()->lightboxImagePage($image2, 'San Francisco', 'Image source: https://stocksnap.io, Creative Commons CC0 license');
31  $image3 = $factory->image()->responsive('assets/ui-examples/images/Image/ski.jpg', 'Skiing');
32  $page3 = $factory->modal()->lightboxImagePage($image3, 'Ski Fun', 'Image source: https://stocksnap.io, Creative Commons CC0 license');
33  $modal = $factory->modal()->lightbox([$page, $page2, $page3]);
34  $button = $factory->button()->standard('Show some fancy images', '')
35  ->withOnClick($modal->getShowSignal());
36 
37  return $renderer->render([$button, $modal]);
38 }
$renderer
global $DIC
Definition: shib_login.php:25
show_multiple_images()
description: > Example for rendering a lightbox image page modal with multiple images.