ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
footer.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
8 
9 function footer(): string
10 {
11  global $DIC;
12  $f = $DIC->ui()->factory();
13  $renderer = $DIC->ui()->renderer();
14 
15  $url = 'src/UI/examples/MainControls/Footer/footer.php?new_footer_ui=1';
16 
17  $page_demo = $f->link()->standard('See UI in fullscreen-mode', $url);
18 
19  return $renderer->render([
20  $page_demo
21  ]);
22 }
23 
24 function pageFooterDemoFooter(): \ILIAS\UI\Component\MainControls\Footer
25 {
26  global $DIC;
27  $f = $DIC->ui()->factory();
28  $df = new \ILIAS\Data\Factory();
29 
30  $text = 'Additional info:';
31  $links = [];
32  $links[] = $f->link()->standard("Goto ILIAS", "http://www.ilias.de");
33  $links[] = $f->link()->standard("Goto Mantis", "http://mantis.ilias.de");
34 
35 
36  return $f->mainControls()->footer($links, $text)->withPermanentURL(
37  $df->uri(
38  ($_SERVER['REQUEST_SCHEME'] ?? "http") . '://'
39  . ($_SERVER['SERVER_NAME'] ?? "localhost") . ':'
40  . ($_SERVER['SERVER_PORT'] ?? "80")
41  . ($_SERVER['SCRIPT_NAME'] ?? "")
42  . "?new_footer_ui=1"
43  )
44  );
45 }
46 
47 global $DIC;
48 
49 //Render Footer in Fullscreen mode
50 if (basename($_SERVER["SCRIPT_FILENAME"]) == "footer.php") {
51  chdir('../../../../../');
52  require_once("libs/composer/vendor/autoload.php");
54  $refinery = $DIC->refinery();
55  $request_wrapper = $DIC->http()->wrapper()->query();
56 }
57 
58 
59 if (isset($request_wrapper) && isset($refinery) && $request_wrapper->has('new_footer_ui') && $request_wrapper->retrieve('new_footer_ui', $refinery->kindlyTo()->string()) == '1') {
61 }
62 
64 {
65  $f = $dic->ui()->factory();
66  $renderer = $dic->ui()->renderer();
67  $logo = $f->image()->responsive("templates/default/images/HeaderIcon.svg", "ILIAS");
68  $responsive_logo = $f->image()->responsive("templates/default/images/HeaderIconResponsive.svg", "ILIAS");
69  $breadcrumbs = pageFooterDemoCrumbs($f);
70  $metabar = pageFooterDemoMetabar($f);
71  $mainbar = pageFooterDemoMainbar($f);
72  $footer = pageFooterDemoFooter();
73  $tc = $dic->ui()->factory()->toast()->container();
74 
75  $content = pageFooterDemoContent($f);
76 
77  $page = $f->layout()->page()->standard(
78  $content,
79  $metabar,
80  $mainbar,
81  $breadcrumbs,
82  $logo,
83  $responsive_logo,
84  "./templates/default/images/favicon.ico",
85  $tc,
86  $footer,
87  'UI PAGE FOOTER DEMO', //page title
88  'ILIAS', //short title
89  'Std. Page Footer Demo' //view title
90  )->withUIDemo(true);
91 
92  return $renderer->render($page);
93 }
94 
96 {
97  return [
98  $f->panel()->standard(
99  'All about the Footer',
100  $f->legacy(
101  "See bellow"
102  )
103  ),
104  ];
105 }
106 
107 function pageFooterDemoMetabar(\ILIAS\UI\Factory $f): \ILIAS\UI\Component\MainControls\MetaBar
108 {
109  $help = $f->button()->bulky($f->symbol()->glyph()->help(), 'Help', '#');
110  return $f->mainControls()->metaBar()->withAdditionalEntry('help', $help);
111 }
112 
114 {
115  return $f->breadcrumbs([]);
116 }
117 
118 function pageFooterDemoMainbar(\ILIAS\UI\Factory $f): \ILIAS\UI\Component\MainControls\MainBar
119 {
120  return $f->mainControls()->mainBar();
121 }
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
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
if(basename($_SERVER["SCRIPT_FILENAME"])=="footer.php") if(isset($request_wrapper) &&isset($refinery) && $request_wrapper->has('new_footer_ui') && $request_wrapper->retrieve('new_footer_ui', $refinery->kindlyTo() ->string())=='1') renderFooterInFullscreenMode(Container $dic)
Definition: footer.php:63
Refinery Factory $refinery