ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
show_a_single_image.php
Go to the documentation of this file.
1<?php
2
19declare(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:26