ILIAS  release_8 Revision v8.23
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 
14  $renderer = $DIC->ui()->renderer();
15 
16  $url = 'src/UI/examples/MainControls/Footer/footer_with_modals.php?new_footer_2_ui=1';
17 
18  $page_demo = $f->link()->standard('See UI in fullscreen-mode', $url);
19 
20  return $renderer->render([
21  $page_demo
22  ]);
23 }
24 
25 function pageFooterDemo2Footer(): \ILIAS\UI\Component\MainControls\Footer
26 {
27  global $DIC;
28  $f = $DIC->ui()->factory();
29 
30  $text = 'Additional info:';
31  $links = [];
32  $links[] = $f->link()->standard("Goto ILIAS", "http://www.ilias.de");
33 
34  $footer = $f->mainControls()->footer($links, $text);
35 
36  $roundTripModal = $f->modal()->roundtrip('Withdrawal of Consent', $f->legacy('Withdrawal of Consent ...'));
37  $shyButton = $f->button()->shy('Terms Of Service', '#');
38  return $footer->withAdditionalModalAndTrigger($roundTripModal, $shyButton);
39 }
40 
41 global $DIC;
42 
43 //Render Footer in Fullscreen mode
44 if (basename($_SERVER["SCRIPT_FILENAME"]) == "footer_with_modals.php") {
45  chdir('../../../../../');
46  require_once("libs/composer/vendor/autoload.php");
48  $refinery = $DIC->refinery();
49  $request_wrapper = $DIC->http()->wrapper()->query();
50 }
51 
52 
53 if (isset($request_wrapper) && isset($refinery) && $request_wrapper->has('new_footer_2_ui') && $request_wrapper->retrieve('new_footer_2_ui', $refinery->kindlyTo()->string()) == '1') {
55 }
56 
58 {
59  require_once("src/UI/examples/MainControls/Footer/footer.php");
60 
61  $f = $dic->ui()->factory();
62  $renderer = $dic->ui()->renderer();
63  $logo = $f->image()->responsive("templates/default/images/HeaderIcon.svg", "ILIAS");
64  $responsive_logo = $f->image()->responsive("templates/default/images/HeaderIconResponsive.svg", "ILIAS");
65  $breadcrumbs = pageFooterDemoCrumbs($f);
66  $metabar = pageFooterDemoMetabar($f);
67  $mainbar = pageFooterDemoMainbar($f);
68  $footer = pageFooterDemo2Footer();
69  $tc = $dic->ui()->factory()->toast()->container();
70 
71  $content = pageFooterDemoContent($f);
72 
73  $page = $f->layout()->page()->standard(
74  $content,
75  $metabar,
76  $mainbar,
77  $breadcrumbs,
78  $logo,
79  $responsive_logo,
80  "./templates/default/images/favicon.ico",
81  $tc,
82  $footer,
83  'UI PAGE FOOTER DEMO', //page title
84  'ILIAS', //short title
85  'Std. Page Footer Demo' //view title
86  )->withUIDemo(true);
87 
88  return $renderer->render($page);
89 }
pageFooterDemoMainbar(\ILIAS\UI\Factory $f)
Definition: footer.php:118
Class Factory.
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:31
if(basename($_SERVER["SCRIPT_FILENAME"])=="footer_with_modals.php") if(isset($request_wrapper) &&isset($refinery) && $request_wrapper->has('new_footer_2_ui') && $request_wrapper->retrieve('new_footer_2_ui', $refinery->kindlyTo() ->string())=='1') renderFooterWithModalsInFullscreenMode(Container $dic)
static initILIAS()
ilias initialisation
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10
pageFooterDemoContent(\ILIAS\UI\Factory $f)
Definition: footer.php:95
pageFooterDemoCrumbs(\ILIAS\UI\Factory $f)
Definition: footer.php:113
pageFooterDemoMetabar(\ILIAS\UI\Factory $f)
Definition: footer.php:107
$dic
Definition: result.php:32
$url
ui()
Get the interface to get services from UI framework.
Definition: Container.php:118
Refinery Factory $refinery