19 declare(strict_types=1);
118 function ui(): string
121 $f = $DIC->ui()->factory();
124 $icon =
$f->symbol()->icon()->standard(
'root',
'')->withSize(
'large');
125 $target = new \ILIAS\Data\URI(
126 $DIC->http()->request()->getUri()->__toString() .
'&new_ui=1' 129 $f->link()->bulky($icon,
'See UI in fullscreen-mode', $target),
152 $f = $dic->ui()->factory();
154 $logo =
$f->image()->responsive(
"assets/images/logo/HeaderIcon.svg",
"ILIAS");
155 $responsive_logo =
$f->image()->responsive(
"assets/images/logo/HeaderIconResponsive.svg",
"ILIAS");
161 $tc = $dic->ui()->factory()->toast()->container();
163 $page =
$f->layout()->page()->standard(
170 "./assets/images/logo/favicon.ico",
184 echo(
'Helo. Content from RPC.');
194 $f->link()->standard(
"entry1",
'#'),
195 $f->link()->standard(
"entry2",
'#'),
196 $f->link()->standard(
"entry3",
'#'),
197 $f->link()->standard(
"entry4",
'#')
199 return $f->breadcrumbs($crumbs);
206 $second_tool = array_values($tools)[1];
207 $url =
"./components/ILIAS/UI/src/examples/Layout/Page/Standard/ui.php?replaced=1";
208 $replace_signal = $second_tool->getReplaceSignal()->withAsyncRenderUrl(
$url);
209 $replace_btn = $f->button()->standard(
'replace contents in 2nd tool', $replace_signal);
212 $invisible_tool_btn = $f->button()->standard(
'show the hidden tool', $engage_signal);
215 $f->panel()->standard(
217 $f->legacy()->content(
218 "This button will replace the contents of the second tool-slate.<br />" 219 .
"Goto Tools, second entry and click it.<br />" 220 . $r->
render($replace_btn)
221 .
"<br><br>This will unhide and activate another tool<br />" 222 . $r->
render($invisible_tool_btn)
226 $f->panel()->standard(
228 $f->legacy()->content(
"some content<br>some content<br>some content<br>x.")
230 $f->panel()->standard(
234 $f->panel()->standard(
236 $f->legacy()->content(
"some content<br>some content<br>some content<br>x.")
243 $df = new \ILIAS\Data\Factory();
244 $text =
'Additional info:';
246 $links[] = $f->link()->standard(
"Goto ILIAS",
"http://www.ilias.de");
247 $links[] = $f->link()->standard(
"Goto ILIAS",
"http://www.ilias.de");
249 return $f->mainControls()->footer()
250 ->withAdditionalLink(...$links)
251 ->withAdditionalText($text)
254 (
$_SERVER[
'REQUEST_SCHEME'] ??
"http") .
'://' 255 . (
$_SERVER[
'SERVER_NAME'] ??
"localhost") .
':' 257 . (
$_SERVER[
'SCRIPT_NAME'] ??
"") .
'?' 265 $help = $f->button()->bulky($f->symbol()->glyph()->help(),
'Help',
'#');
266 $user = $f->button()->bulky($f->symbol()->glyph()->user(),
'User',
'#');
267 $search = $f->maincontrols()->slate()->legacy(
269 $f->symbol()->glyph()->search()->withCounter($f->counter()->status(1)),
270 $f->legacy()->content(substr(
loremIpsum(), 0, 180))
272 $notes = $f->maincontrols()->slate()->legacy(
274 $f->symbol()->glyph()->notification()->withCounter($f->counter()->novelty(3)),
275 $f->legacy()->content(
'<p>some content</p>')
278 return $f->mainControls()->metaBar()
279 ->withAdditionalEntry(
'search', $search)
280 ->withAdditionalEntry(
'help', $help)
281 ->withAdditionalEntry(
'notes', $notes)
282 ->withAdditionalEntry(
'user', $user);
287 $tools_btn = $f->button()->bulky(
288 $f->symbol()->icon()->custom(
'./assets/ui-examples/images/Page/grid.svg',
''),
293 $mainbar = $f->mainControls()->mainBar()
304 foreach ($entries as
$id => $entry) {
305 $mainbar = $mainbar->withAdditionalEntry(
$id, $entry);
311 ->withAdditionalToolEntry(
'tool1', $tools[
'tool1'],
false, $f->button()->close())
312 ->withAdditionalToolEntry(
'tool2', $tools[
'tool2'])
313 ->withAdditionalToolEntry(
'tool3', $tools[
'tool3'],
true, $f->button()->close())
314 ->withAdditionalToolEntry(
'tool4', $tools[
'tool4'],
false, $f->button()->close());
320 $symbol = $f->symbol()->icon()
321 ->custom(
'./assets/ui-examples/images/Page/layers.svg',
'')
323 $slate = $f->maincontrols()->slate()->combined(
'Repository', $symbol);
325 $icon = $f->symbol()->icon()
328 ->withAbbreviation(
'X');
330 $button = $f->button()->bulky(
333 './components/ILIAS/UI/src/examples/Layout/Page/Standard/ui.php?new_ui=1' 336 $df = new \ILIAS\Data\Factory();
344 $link1 = $f->link()->bulky($icon,
'Favorites (Link)',
$url);
345 $link2 = $f->link()->bulky($icon,
'Courses (Link2)',
$url);
346 $link3 = $f->link()->bulky($icon,
'Groups (Link)',
$url);
349 ->withAdditionalEntry($button->withLabel(
'Repository - Home'))
350 ->withAdditionalEntry($button->withLabel(
'Repository - Tree'))
351 ->withAdditionalEntry($button->withLabel(
'Repository - Last visited'))
352 ->withAdditionalEntry($link1)
353 ->withAdditionalEntry($link2)
354 ->withAdditionalEntry($link3)
355 ->withAdditionalEntry($button->withLabel(
'Study Programme'))
356 ->withAdditionalEntry($button->withLabel(
'Own Repository-Objects'));
358 foreach (range(1, 20) as $cnt) {
359 $slate = $slate->withAdditionalEntry($button->withLabel(
'fillup ' . $cnt));
367 $icon = $f->symbol()->icon()
370 ->withAbbreviation(
'X');
372 $button = $f->button()->bulky(
375 './components/ILIAS/UI/src/examples/Layout/Page/Standard/ui.php?new_ui=1' 378 $symbol = $f->symbol()->icon()
379 ->custom(
'./assets/ui-examples/images/Page/user.svg',
'')
382 $slate = $f->maincontrols()->slate()
383 ->combined(
'Personal Workspace', $symbol);
385 $symbol = $f->symbol()->icon()
386 ->custom(
'./assets/ui-examples/images/Page/bookmarks.svg',
'')
389 $bookmarks = $f->legacy()->content(implode(
'<br />', [
390 $r->
render($f->button()->shy(
'my bookmark 1',
'#')),
391 $r->
render($f->button()->shy(
'my bookmark 2',
'#'))
393 $slate_bookmarks = $f->maincontrols()->slate()
394 ->legacy(
'Bookmarks', $symbol, $bookmarks);
397 ->withAdditionalEntry($button->withLabel(
'Overview'))
398 ->withAdditionalEntry($slate_bookmarks)
399 ->withAdditionalEntry($button->withLabel(
'Calendar'))
400 ->withAdditionalEntry($button->withLabel(
'Task'))
401 ->withAdditionalEntry($button->withLabel(
'Portfolios'))
402 ->withAdditionalEntry($button->withLabel(
'Personal Resources'))
403 ->withAdditionalEntry($button->withLabel(
'Shared Resources'))
404 ->withAdditionalEntry($button->withLabel(
'Notes'))
405 ->withAdditionalEntry($button->withLabel(
'News'))
406 ->withAdditionalEntry($button->withLabel(
'Background Tasks'));
411 $symbol = $f->symbol()->icon()
412 ->custom(
'./assets/ui-examples/images/Page/achievements.svg',
'')
414 return $f->maincontrols()->slate()->legacy(
417 $f->legacy()->content(
'content: Achievements')
423 $symbol = $f->symbol()->icon()
424 ->custom(
'./assets/ui-examples/images/Page/communication.svg',
'')
426 return $f->maincontrols()->slate()->legacy(
429 $f->legacy()->content(
'content: Communication')
435 $symbol = $f->symbol()->icon()
436 ->custom(
'./assets/ui-examples/images/Page/organisation.svg',
'')
439 $sf = $f->maincontrols()->slate();
440 return $sf->combined(
'Organisation', $symbol)
441 ->withAdditionalEntry(
442 $sf->combined(
'1', $symbol)
443 ->withAdditionalEntry($sf->combined(
'1.1', $symbol))
444 ->withAdditionalEntry(
445 $sf->combined(
'1.2', $symbol)
446 ->withAdditionalEntry($sf->combined(
'1.2.1', $symbol))
447 ->withAdditionalEntry($sf->combined(
'1.2.2', $symbol))
450 ->withAdditionalEntry(
451 $sf->combined(
'2', $symbol)
452 ->withAdditionalEntry($sf->combined(
'2.1', $symbol))
454 ->withAdditionalEntry($sf->combined(
'3', $symbol))
455 ->withAdditionalEntry($sf->combined(
'4', $symbol));
460 $symbol = $f->symbol()->icon()
461 ->custom(
'./assets/ui-examples/images/Page/administration.svg',
'')
463 return $f->maincontrols()->slate()->legacy(
466 $f->legacy()->content(
'content: Administration')
474 $symbol = $f->symbol()->icon()
475 ->custom(
'./assets/ui-examples/images/Page/question.svg',
'')
477 $slate = $f->maincontrols()->slate()->legacy(
480 $f->legacy()->content(
' 483 Some Text for help entry 486 <button onclick="alert(\'helo - tool 1 \');">Some Dummybutton</button> 488 <button onclick="alert(\'helo - tool 1, button 2 \');">some other dummybutton</button> 492 $tools[
'tool1'] = $slate;
494 $symbol = $f->symbol()->icon()
495 ->custom(
'./assets/ui-examples/images/Page/pencil.svg',
'')
497 $slate = $f->maincontrols()->slate()->legacy(
500 $f->legacy()->content(
' 503 Some Text for editor entry 505 <button onclick="alert(\'helo\');">Some Dummybutton</button> 511 $tools[
'tool2'] = $slate;
513 $symbol = $f->symbol()->icon()
514 ->custom(
'./assets/ui-examples/images/Page/notebook.svg',
'')
516 $slate = $f->maincontrols()->slate()->legacy(
521 $tools[
'tool3'] = $slate;
523 $slate = $f->maincontrols()->slate()->legacy(
528 $tools[
'tool4'] = $slate;
539 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
540 tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
541 At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
542 no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
543 consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
544 dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo
545 duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus
546 est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
547 sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore
548 magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo
549 dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est
550 Lorem ipsum dolor sit amet.
553 Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie
554 consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan
555 et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis
556 dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer
557 adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore
558 magna aliquam erat volutpat.
561 Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit
562 lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure
563 dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore
564 eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui
565 blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
568 Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming
569 id quod mazim placerat facer
if($request_wrapper->has('new_ui') && $request_wrapper->retrieve('new_ui', $refinery->kindlyTo() ->int())===1) renderFullDemoPage(\ILIAS\DI\Container $dic)
getDemoEntryAdministration(\ILIAS\UI\Factory $f)
getDemoEntryRepository(\ILIAS\UI\Factory $f)
getDemoEntryAchievements(\ILIAS\UI\Factory $f)
ui()
description: > Example for rendering a UI.
This describes the MainBar.
pagedemoContent(\ILIAS\UI\Factory $f, Renderer $r, MainBar $mainbar)
render($component, ?Renderer $root=null)
Render given component.
Interface Observer Contains several chained tasks and infos about them.
getDemoEntryCommunication(\ILIAS\UI\Factory $f)
pagedemoMainbar(\ILIAS\UI\Factory $f, Renderer $r)
pagedemoMetabar(\ILIAS\UI\Factory $f)
Customizing of pimple-DIC for ILIAS.
static initILIAS()
ilias initialisation
if(isset($request_wrapper) &&isset($refinery) && $request_wrapper->has('replaced') && $request_wrapper->retrieve('replaced', $refinery->kindlyTo() ->string())=='1') pagedemoCrumbs($f)
Below are helpers for the construction of demo-content.
getDemoEntryOrganisation(\ILIAS\UI\Factory $f)
getDemoEntryTools(\ILIAS\UI\Factory $f)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
pagedemoFooter(\ILIAS\UI\Factory $f)
withToolsButton(Button\Bulky $button)
Set button for the tools-trigger.
getEngageToolSignal(string $tool_id)
Signal to engage a tool from outside the MainBar.
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getDemoEntryPersonalWorkspace(\ILIAS\UI\Factory $f, Renderer $r)