ILIAS  trunk Revision v11.0_alpha-1846-g895b5f47236
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
show_multiple_images.php
Go to the documentation of this file.
1 <?php
2 
19 declare(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:22
show_multiple_images()
description: > Example for rendering a lightbox image page modal with multiple images.