ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
show_modal_on_button_click.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
namespace
ILIAS\UI\examples\Modal\LightboxCardPage
;
6
13
function
show_modal_on_button_click
(): string
14
{
15
global
$DIC
;
16
17
$ui = $DIC->ui()->factory();
18
19
$item = $ui->item()
20
->standard(
'Some information'
)
21
->withDescription(
'A very long text.'
);
22
23
24
$another_item = $ui->item()
25
->standard(
'Some other information'
)
26
->withDescription(
'Another very long text.'
)
27
->withProperties([
28
'Belongs to'
=>
'No one'
,
29
'Created on'
=>
'June the 15th'
,
30
'Awarded by'
=>
'John Doe'
,
31
'Valid until'
=>
'Forever'
,
32
]);
33
34
$card = $ui->card()
35
->standard(
'A card title'
)
36
->withSections([$item])
37
->withHiddenSections([$another_item]);
38
$box = $ui->modal()->lightboxCardPage($card);
39
$modal = $ui->modal()->lightbox($box);
40
41
$button = $ui
42
->button()
43
->standard(
'Show Modal'
,
''
)
44
->withOnClick($modal->getShowSignal());
45
46
return
$DIC->ui()->renderer()->render([$button, $modal]);
47
}
ILIAS\UI\examples\Modal\LightboxCardPage
Definition:
show_modal_on_button_click.php:5
$DIC
global $DIC
Definition:
shib_login.php:25
ILIAS\UI\examples\Modal\LightboxCardPage\show_modal_on_button_click
show_modal_on_button_click()
expected output: > ILIAS shows the rendered Component.
Definition:
show_modal_on_button_click.php:13
components
ILIAS
UI
src
examples
Modal
LightboxCardPage
show_modal_on_button_click.php
Generated on Wed Sep 10 2025 15:16:45 for ILIAS by
1.8.13 (using
Doxyfile
)