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

Functions

 base ()
 
 maybeRenderFooterInFullScreenMode (\ILIAS\HTTP\Wrapper\RequestWrapper $request, \ILIAS\Refinery\Factory $refinery, \ILIAS\UI\Component\MainControls\Footer $footer,)
 
 getFullScreenDemoPage (\ILIAS\UI\Factory $factory, \ILIAS\UI\Component\MainControls\Footer $footer,)
 

Function Documentation

◆ base()

ILIAS\UI\examples\MainControls\Footer\base ( )

description: > The initial screen shows a Primary Button. When clicked, the current Page is reloaded and a fullscreen demo Page appears, which features the Footer.

expected output: > ILIAS shows the Primary Button. After the Button is clicked, ILIAS loads a demo Page, which shows the Footer. The Footer consists of 5 distinct sections, each operable by keyboard and accessible for screen-readers.

(For testing/HTML validation, please click the button and validate the footer on the consecutive page.)

Definition at line 37 of file base.php.

37 : string
38{
39 global $DIC;
40 $factory = $DIC->ui()->factory();
41 $renderer = $DIC->ui()->renderer();
42 $request = $DIC->http()->wrapper()->query();
43 $request_url = $DIC->http()->request()->getUri();
44 $data_factory = new \ILIAS\Data\Factory();
45 $refinery_factory = new \ILIAS\Refinery\Factory($data_factory, $DIC->language());
46
47 $example_uri = $data_factory->uri($request_url->__toString());
48
49 $pseudo_icon = $factory->symbol()->icon()->standard('', 'Pseudo Icon')->withAbbreviation('P');
50
51 $pseudo_links = [
52 $factory->link()->standard('Some Pseudo Link', '#'),
53 $factory->link()->standard('Another Pseudo Link', '#'),
54 $factory->link()->standard('Pseudo Link', '#'),
55 ];
56
57 $footer = $factory->mainControls()->footer();
58 $footer = $footer
59 ->withPermanentURL($example_uri)
60 ->withAdditionalLinkGroup("Link Group 1", $pseudo_links)
61 ->withAdditionalLinkGroup("Link Group 2", $pseudo_links)
62 ->withAdditionalLinkGroup("Link Group 3", $pseudo_links)
63 ->withAdditionalLinkGroup("Link Group 4", $pseudo_links)
64 ->withAdditionalLink(...$pseudo_links)
65 ->withAdditionalIcon($pseudo_icon, null)
66 ->withAdditionalIcon($pseudo_icon, null)
67 ->withAdditionalIcon($pseudo_icon, null)
68 ->withAdditionalText(
69 'Powered by ILIAS',
70 'Running on green energy',
71 'It\'s (swearword) huge!',
72 );
73
74 maybeRenderFooterInFullScreenMode($request, $refinery_factory, $footer);
75
76 $open_footer_in_fullscreen = $factory->button()->primary(
77 'See Footer in fullscreen',
78 $example_uri . '&ui_maincontrols_footer_example=1',
79 );
80
81 return $renderer->render($open_footer_in_fullscreen);
82}
$renderer
maybeRenderFooterInFullScreenMode(\ILIAS\HTTP\Wrapper\RequestWrapper $request, \ILIAS\Refinery\Factory $refinery, \ILIAS\UI\Component\MainControls\Footer $footer,)
Definition: base.php:84
global $DIC
Definition: shib_login.php:26

References $DIC, $renderer, and ILIAS\UI\examples\MainControls\Footer\maybeRenderFooterInFullScreenMode().

+ Here is the call graph for this function:

◆ getFullScreenDemoPage()

ILIAS\UI\examples\MainControls\Footer\getFullScreenDemoPage ( \ILIAS\UI\Factory  $factory,
\ILIAS\UI\Component\MainControls\Footer  $footer 
)

Definition at line 112 of file base.php.

116 return $factory->layout()->page()->standard(
117 [],
118 $factory->mainControls()->metaBar(),
119 $factory->mainControls()->mainBar(),
120 $factory->breadcrumbs([]),
121 $factory->image()->responsive("assets/images/logo/HeaderIcon.svg", "ILIAS"),
122 $factory->image()->responsive("assets/images/logo/HeaderIconResponsive.svg", "ILIAS"),
123 './assets/images/logo/favicon.ico',
124 $factory->toast()->container(),
125 $footer,
126 'Footer Example',
127 'Footer Example',
128 'ILIAS',
129 )->withUIDemo(true);
130}
This describes the Page.
Definition: Page.php:31

◆ maybeRenderFooterInFullScreenMode()

ILIAS\UI\examples\MainControls\Footer\maybeRenderFooterInFullScreenMode ( \ILIAS\HTTP\Wrapper\RequestWrapper  $request,
\ILIAS\Refinery\Factory  $refinery,
\ILIAS\UI\Component\MainControls\Footer  $footer 
)

Definition at line 84 of file base.php.

88 : void {
89 if (!$request->has('ui_maincontrols_footer_example')
90 || 1 !== $request->retrieve('ui_maincontrols_footer_example', $refinery->kindlyTo()->int())
91 ) {
92 return;
93 }
94
96
97 global $DIC;
98
99 $html = $DIC->ui()->renderer()->render(
100 getFullScreenDemoPage($DIC->ui()->factory(), $footer)
101 );
102
103 $DIC->http()->saveResponse(
104 $DIC->http()->response()
105 ->withHeader('Content-Type', 'text/html; charset=utf-8')
106 ->withBody(\ILIAS\Filesystem\Stream\Streams::ofString($html))
107 );
108 $DIC->http()->sendResponse();
109 $DIC->http()->close();
110}
static initILIAS()
ilias initialisation
getFullScreenDemoPage(\ILIAS\UI\Factory $factory, \ILIAS\UI\Component\MainControls\Footer $footer,)
Definition: base.php:112
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

Referenced by ILIAS\UI\examples\MainControls\Footer\base().

+ Here is the caller graph for this function: