ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\UI\examples\MainControls\SystemInfo Namespace Reference

Functions

 long_text ()
 
 multiple ()
 
 simple ()
 

Function Documentation

◆ long_text()

ILIAS\UI\examples\MainControls\SystemInfo\long_text ( )

description: > This example show how the UI-Elements itself looks like. For a full example use the example of the UI-Component Layout\Page\Standard.

expected output: > ILIAS shows a box with a longish text. The text is terminated by three dots,

and will expand to its full length when clicking those dots.

Definition at line 36 of file long_text.php.

37{
38 global $DIC;
39 $f = $DIC->ui()->factory();
40 $renderer = $DIC->ui()->renderer();
41
42 $long_text = $f->mainControls()->systemInfo(
43 'This Message has a long body',
44 <<<TEXT
45Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
46tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
47vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
48no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
49consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
50dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo
51dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
52ipsum dolor sit amet.
53TEXT
54 );
55
56 return $renderer->render([$long_text]);
57}
$renderer
global $DIC
Definition: shib_login.php:26

References $DIC, Vendor\Package\$f, and $renderer.

◆ multiple()

ILIAS\UI\examples\MainControls\SystemInfo\multiple ( )

description: > This example show how the UI-Elements itself looks like. For a full example use the example of the UI-Component Layout\Page\Standard.

expected output: > Instead of but one message, ILIAS will display three messages in differently

colored boxes. The intensity of the colors decreases from top to bottom.

Definition at line 36 of file multiple.php.

37{
38 global $DIC;
39 $f = $DIC->ui()->factory();
40 $renderer = $DIC->ui()->renderer();
41
42 $first = $f->mainControls()
43 ->systemInfo('This is the first Message!', 'content of the first message...')
44 ->withDenotation(SystemInfo::DENOTATION_BREAKING);
45 $second = $f->mainControls()
46 ->systemInfo('This is the second Message!', 'content of the second message...')
47 ->withDenotation(SystemInfo::DENOTATION_IMPORTANT);
48 $third = $f->mainControls()
49 ->systemInfo('This is the third Message!', 'content of the third message...');
50
51 return $renderer->render([$first, $second, $third]);
52}

References $DIC, Vendor\Package\$f, $renderer, ILIAS\UI\Component\MainControls\SystemInfo\DENOTATION_BREAKING, and ILIAS\UI\Component\MainControls\SystemInfo\DENOTATION_IMPORTANT.

◆ simple()

ILIAS\UI\examples\MainControls\SystemInfo\simple ( )

description: > This example show how the UI-Elements itself looks like. For a full example use the example of the UI-Component Layout\Page\Standard.

expected output: > ILIAS shows a box with a message text. The message is dismissable with the close-glyph on the right and will vanish

when clicking the glyph.

Definition at line 37 of file simple.php.

38{
39 //
40 //
41
42 global $DIC;
43 $f = $DIC->ui()->factory();
44 $renderer = $DIC->ui()->renderer();
45
46 $dismiss_action = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "http://localhost";
47 $systemInfo = $f->mainControls()
48 ->systemInfo('This is an neutral Message!', 'read it, understand it, dismiss it...')
49 ->withDismissAction(new URI($dismiss_action));
50
51 return $renderer->render([$systemInfo]);
52}
The scope of this class is split ilias-conform URI's into components.
Definition: URI.php:35
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26

References $_SERVER, $DIC, Vendor\Package\$f, and $renderer.

Referenced by ilXlsFoParserTest\nonBreakingSpaceIsAddedDataProvider(), ilXlsFoParserTest\noNonBreakingSpaceIsAddedDataProvider(), SimpleNodeTest\testRendering(), and SimpleNodeTest\testRenderingWithAsync().

+ Here is the caller graph for this function: