ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
show_a_single_image.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
namespace
ILIAS\UI\examples\Modal\LightboxImagePage
;
6
18
function
show_a_single_image
()
19
{
20
global
$DIC
;
21
$factory = $DIC->ui()->factory();
22
$renderer
= $DIC->ui()->renderer();
23
$image = $factory->image()->responsive(
"assets/ui-examples/images/Image/mountains.jpg"
,
"Image source: https://stocksnap.io, Creative Commons CC0 license"
);
24
$page = $factory->modal()->lightboxImagePage($image,
'Mountains'
);
25
$modal = $factory->modal()->lightbox($page);
26
$button = $factory->button()->standard(
'Show Image'
,
''
)
27
->withOnClick($modal->getShowSignal());
28
29
return
$renderer
->render([$button, $modal]);
30
}
$renderer
$renderer
Definition:
build_bootstrap.php:83
$DIC
global $DIC
Definition:
shib_login.php:25
ILIAS\UI\examples\Modal\LightboxImagePage\show_a_single_image
show_a_single_image()
description: > Example for rendering a lightbox image page modal with a single image.
Definition:
show_a_single_image.php:18
ILIAS\UI\examples\Modal\LightboxImagePage
Definition:
show_a_single_image.php:5
components
ILIAS
UI
src
examples
Modal
LightboxImagePage
show_a_single_image.php
Generated on Wed Sep 10 2025 15:16:45 for ILIAS by
1.8.13 (using
Doxyfile
)