ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\UI\examples\Legacy\Content Namespace Reference

Functions

 base ()
 
 inside_panel ()
 

Function Documentation

◆ base()

ILIAS\UI\examples\Legacy\Content\base ( )

description: > Example for rendering a legacy box with an inside panel.

expected output: >

ILIAS shows a box including the text "Legacy Content".

Definition at line 32 of file base.php.

33{
34 //Init Factory and Renderer
35 global $DIC;
36 $f = $DIC->ui()->factory();
37 $renderer = $DIC->ui()->renderer();
38
39 //Init Component
40 $legacy = $f->legacy()->content("Legacy\Content");
41
42 //Render
43 return $renderer->render($legacy);
44}
$renderer
global $DIC
Definition: shib_login.php:26

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

◆ inside_panel()

ILIAS\UI\examples\Legacy\Content\inside_panel ( )

description: > Example for rendering a legacy box.

expected output: > ILIAS shows a box titled "Panel Title" and a grey background. In the lower part of the box the text "Legacy Content"

on a white background is written.

Definition at line 33 of file inside_panel.php.

34{
35 //Init Factory and Renderer
36 global $DIC;
37 $f = $DIC->ui()->factory();
38 $renderer = $DIC->ui()->renderer();
39
40 //Init Component
41 $legacy = $f->legacy()->content("Legacy Content");
42 $panel = $f->panel()->standard("Panel Title", $legacy);
43
44 //Render
45 return $renderer->render($panel);
46}

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