ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
show_multiple_images.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
8 {
9  global $DIC;
10  $factory = $DIC->ui()->factory();
11  $renderer = $DIC->ui()->renderer();
12  $image = $factory->image()->responsive('src/UI/examples/Image/mountains.jpg', 'Nice view on some mountains');
13  $page = $factory->modal()->lightboxImagePage($image, 'Mountains', 'Image source: https://stocksnap.io, Creative Commons CC0 license');
14  $image2 = $factory->image()->responsive('src/UI/examples/Image/sanfrancisco.jpg', 'The golden gate bridge');
15  $page2 = $factory->modal()->lightboxImagePage($image2, 'San Francisco', 'Image source: https://stocksnap.io, Creative Commons CC0 license');
16  $image3 = $factory->image()->responsive('src/UI/examples/Image/ski.jpg', 'Skiing');
17  $page3 = $factory->modal()->lightboxImagePage($image3, 'Ski Fun', 'Image source: https://stocksnap.io, Creative Commons CC0 license');
18  $modal = $factory->modal()->lightbox([$page, $page2, $page3]);
19  $button = $factory->button()->standard('Show some fancy images', '')
20  ->withOnClick($modal->getShowSignal());
21 
22  return $renderer->render([$button, $modal]);
23 }
global $DIC
Definition: feed.php:28
$factory
Definition: metadata.php:75