ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
show_modal_on_button_click.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\UI\examples\Modal\LightboxCardPage
;
22
29
function
show_modal_on_button_click
(): string
30
{
31
global
$DIC
;
32
33
$ui = $DIC->ui()->factory();
34
35
$item = $ui->item()
36
->standard(
'Some information'
)
37
->withDescription(
'A very long text.'
);
38
39
40
$another_item = $ui->item()
41
->standard(
'Some other information'
)
42
->withDescription(
'Another very long text.'
)
43
->withProperties([
44
'Belongs to'
=>
'No one'
,
45
'Created on'
=>
'June the 15th'
,
46
'Awarded by'
=>
'John Doe'
,
47
'Valid until'
=>
'Forever'
,
48
]);
49
50
$card = $ui->card()
51
->standard(
'A card title'
)
52
->withSections([$item])
53
->withHiddenSections([$another_item]);
54
$box = $ui->modal()->lightboxCardPage($card);
55
$modal = $ui->modal()->lightbox($box);
56
57
$button = $ui
58
->button()
59
->standard(
'Show Modal'
,
''
)
60
->withOnClick($modal->getShowSignal());
61
62
return
$DIC->ui()->renderer()->render([$button, $modal]);
63
}
ILIAS\UI\examples\Modal\LightboxCardPage
Definition:
show_modal_on_button_click.php:21
$DIC
global $DIC
Definition:
shib_login.php:26
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:29
components
ILIAS
UI
src
examples
Modal
LightboxCardPage
show_modal_on_button_click.php
Generated on Sun Aug 31 2025 23:04:10 for ILIAS by
1.8.13 (using
Doxyfile
)