ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\UI\examples\Modal\LightboxCardPage Namespace Reference

Functions

 show_modal_on_button_click ()
 

expected output: > ILIAS shows the rendered Component. More...

 

Function Documentation

◆ show_modal_on_button_click()

ILIAS\UI\examples\Modal\LightboxCardPage\show_modal_on_button_click ( )


expected output: > ILIAS shows the rendered Component.


Definition at line 29 of file show_modal_on_button_click.php.

References $DIC.

29  : 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 }
global $DIC
Definition: shib_login.php:22