ILIAS  trunk Revision v11.0_alpha-1731-gff9cd7e2bd3
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
show_a_single_image.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
35 {
36  global $DIC;
37  $factory = $DIC->ui()->factory();
38  $renderer = $DIC->ui()->renderer();
39  $image = $factory->image()->responsive("assets/ui-examples/images/Image/mountains.jpg", "Image source: https://stocksnap.io, Creative Commons CC0 license");
40  $page = $factory->modal()->lightboxImagePage($image, 'Mountains');
41  $modal = $factory->modal()->lightbox($page);
42  $button = $factory->button()->standard('Show Image', '')
43  ->withOnClick($modal->getShowSignal());
44 
45  return $renderer->render([$button, $modal]);
46 }
$renderer
global $DIC
Definition: shib_login.php:22
show_a_single_image()
description: > Example for rendering a lightbox image page modal with a single image.