ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
show_multiple_images.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
39{
40 global $DIC;
41 $factory = $DIC->ui()->factory();
42 $renderer = $DIC->ui()->renderer();
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());
52
53 return $renderer->render([$button, $modal]);
54}
$renderer
global $DIC
Definition: shib_login.php:26