ILIAS  release_7 Revision v7.30-3-g800a261c036
show_multiple_images.php
Go to the documentation of this file.
1<?php
3{
4 global $DIC;
5 $factory = $DIC->ui()->factory();
6 $renderer = $DIC->ui()->renderer();
7 $image = $factory->image()->responsive('src/UI/examples/Image/mountains.jpg', 'Nice view on some mountains');
8 $page = $factory->modal()->lightboxImagePage($image, 'Mountains', 'Image source: https://stocksnap.io, Creative Commons CC0 license');
9 $image2 = $factory->image()->responsive('src/UI/examples/Image/sanfrancisco.jpg', 'The golden gate bridge');
10 $page2 = $factory->modal()->lightboxImagePage($image2, 'San Francisco', 'Image source: https://stocksnap.io, Creative Commons CC0 license');
11 $image3 = $factory->image()->responsive('src/UI/examples/Image/ski.jpg', 'Skiing');
12 $page3 = $factory->modal()->lightboxImagePage($image3, 'Ski Fun', 'Image source: https://stocksnap.io, Creative Commons CC0 license');
13 $modal = $factory->modal()->lightbox([$page, $page2, $page3]);
14 $button = $factory->button()->standard('Show some fancy images', '')
15 ->withOnClick($modal->getShowSignal());
16
17 return $renderer->render([$button, $modal]);
18}
An exception for terminatinating execution or to throw for unit testing.
global $DIC
Definition: goto.php:24
$factory
Definition: metadata.php:58
show_multiple_images()