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

Functions

 show_a_single_text ()
 

description: > Example for rendering a lightbox text page modal with a single text. More...

 
 show_multiple_texts ()
 

description: > Example for rendering a lightbox text page modal with multiple texts. More...

 

Function Documentation

◆ show_a_single_text()

ILIAS\UI\examples\Modal\LightboxTextPage\show_a_single_text ( )


description: > Example for rendering a lightbox text page modal with a single text.

expected output: > ILIAS shows a button titled "Show Text".

A click onto the button greys out ILIAS and opens the modal titled "User Agreement" and also a text.

Definition at line 33 of file show_a_single_text.php.

References $DIC, and $renderer.

34 {
35  global $DIC;
36  $factory = $DIC->ui()->factory();
37  $renderer = $DIC->ui()->renderer();
38  $page = $factory->modal()->lightboxTextPage('Some text content you have to agree on!', 'User Agreement');
39  $modal = $factory->modal()->lightbox($page);
40  $button = $factory->button()->standard('Show Text', '')
41  ->withOnClick($modal->getShowSignal());
42 
43  return $renderer->render([$button, $modal]);
44 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ show_multiple_texts()

ILIAS\UI\examples\Modal\LightboxTextPage\show_multiple_texts ( )


description: > Example for rendering a lightbox text page modal with multiple texts.

expected output: > ILIAS shows a button titled "Show texts". A click onto the button greys out ILIAS and opens a modal with multiple contents which can be viewed each after another by clicking the arrow glyphs. All contents consist of a title each. In the lower part of the modal a circle glyph is centered about which you can see that you can look at two contents

within the modal.

Definition at line 37 of file show_multiple_texts.php.

References $DIC, and $renderer.

38 {
39  global $DIC;
40  $factory = $DIC->ui()->factory();
41  $renderer = $DIC->ui()->renderer();
42  $page1 = $factory->modal()->lightboxTextPage('Some text content you have to agree on!', 'User Agreement');
43  $page2 = $factory->modal()->lightboxTextPage(
44  'Another text content you have to agree on!',
45  'Data Privacy Statement'
46  );
47  $modal = $factory->modal()->lightbox([$page1, $page2]);
48  $button = $factory->button()->standard('Show Texts', '')
49  ->withOnClick($modal->getShowSignal());
50 
51  return $renderer->render([$button, $modal]);
52 }
$renderer
global $DIC
Definition: shib_login.php:22