ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
footer_with_modals.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
8 
9 function footer_with_modals(): string
10 {
11  global $DIC;
12  $f = $DIC->ui()->factory();
13  $renderer = $DIC->ui()->renderer();
14  $url = $DIC->http()->request()->getUri()->__toString() . '&new_footer_2_ui=1';
15  $page_demo = $f->link()->standard('See UI in fullscreen-mode', $url);
16 
17  return $renderer->render($page_demo);
18 }
19 
20 function pageFooterDemo2Footer(): \ILIAS\UI\Component\MainControls\Footer
21 {
22  global $DIC;
23  $f = $DIC->ui()->factory();
24 
25  $text = 'Additional info:';
26  $links = [];
27  $links[] = $f->link()->standard("Goto ILIAS", "http://www.ilias.de");
28 
29  $footer = $f->mainControls()->footer($links, $text);
30 
31  $roundTripModal = $f->modal()->roundtrip('Withdrawal of Consent', $f->legacy('Withdrawal of Consent ...'));
32  $shyButton = $f->button()->shy('Terms Of Service', '#');
33  return $footer->withAdditionalModalAndTrigger($roundTripModal, $shyButton);
34 }
35 
36 global $DIC;
37 
38 $request_wrapper = $DIC->http()->wrapper()->query();
39 $refinery = $DIC->refinery();
40 
41 if ($request_wrapper->has('new_footer_2_ui')
42  && $request_wrapper->retrieve('new_footer_2_ui', $refinery->kindlyTo()->int()) === 1
43 ) {
46  exit();
47 }
48 
49 
51 {
52  require_once("src/UI/examples/MainControls/Footer/footer.php");
53 
54  $f = $dic->ui()->factory();
55  $renderer = $dic->ui()->renderer();
56  $logo = $f->image()->responsive("templates/default/images/logo/HeaderIcon.svg", "ILIAS");
57  $responsive_logo = $f->image()->responsive("templates/default/images/logo/HeaderIconResponsive.svg", "ILIAS");
58  $breadcrumbs = pageFooterDemoCrumbs($f);
59  $metabar = pageFooterDemoMetabar($f);
60  $mainbar = pageFooterDemoMainbar($f);
61  $footer = pageFooterDemo2Footer();
62  $tc = $dic->ui()->factory()->toast()->container();
63 
64  $content = pageFooterDemoContent($f);
65 
66  $page = $f->layout()->page()->standard(
67  $content,
68  $metabar,
69  $mainbar,
70  $breadcrumbs,
71  $logo,
72  $responsive_logo,
73  "./templates/default/images/logo/favicon.ico",
74  $tc,
75  $footer,
76  'UI PAGE FOOTER DEMO', //page title
77  'ILIAS', //short title
78  'Std. Page Footer Demo' //view title
79  )->withUIDemo(true);
80 
81  return $renderer->render($page);
82 }
pageFooterDemoMainbar(\ILIAS\UI\Factory $f)
Definition: footer.php:112
exit
Definition: login.php:29
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
static initILIAS()
ilias initialisation
$url
Definition: ltiregstart.php:35
pageFooterDemoContent(\ILIAS\UI\Factory $f)
Definition: footer.php:89
pageFooterDemoCrumbs(\ILIAS\UI\Factory $f)
Definition: footer.php:107
pageFooterDemoMetabar(\ILIAS\UI\Factory $f)
Definition: footer.php:101
$dic
Definition: result.php:32
ui()
Get the interface to get services from UI framework.
Definition: Container.php:127
if($request_wrapper->has('new_footer_2_ui') && $request_wrapper->retrieve('new_footer_2_ui', $refinery->kindlyTo() ->int())===1) renderFooterWithModalsInFullscreenMode(Container $dic)