ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ContentRenderer.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\Hasher;
25
30{
31 use Hasher;
32
33 public function run(): void
34 {
35 global $DIC;
36
37 $GS = $DIC->globalScreen();
38
39 $GS->collector()->mainmenu()->collectStructure();
40 $GS->collector()->mainmenu()->filterItemsByVisibilty(true);
41 $GS->collector()->mainmenu()->prepareItemsForUIRepresentation();
42
43 $unhash = $this->unhash($_GET['item']);
44 $identification = $GS->identification()->fromSerializedIdentification($unhash);
45 $item = $GS->collector()->mainmenu()->getSingleItemFromFilter($identification);
46
47 if ($item instanceof Lost) {
48 $f = $DIC->ui()->factory();
49 $component = $f->button()->bulky(
50 $f->symbol()->glyph()->login(),
51 $DIC->language()->txt('login'),
52 'login.php?client_id=' . rawurlencode(CLIENT_ID) . '&cmd=force_login&lang=' . $DIC->user()->getCurrentLanguage()
53 );
54 } else {
55 $component = $item->getTypeInformation()->getRenderer()->getComponentForItem($item, true);
56 }
57 echo $DIC->ui()->renderer()->renderAsync($component);
58 }
59}
const CLIENT_ID
Definition: constants.php:41
$_GET['cmd']
Definition: lti.php:26
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26