ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
gs_content.php
Go to the documentation of this file.
1 <?php
2 
4 
5 require_once('./libs/composer/vendor/autoload.php');
6 
9 
11 {
12  use Hasher;
13 
14  public function run()
15  {
18  global $DIC;
19 
20  $GS = $DIC->globalScreen();
21 
22  $GS->collector()->mainmenu()->collectStructure();
23  $GS->collector()->mainmenu()->filterItemsByVisibilty(true);
24  $GS->collector()->mainmenu()->prepareItemsForUIRepresentation();
25 
26  $unhash = $this->unhash($_GET['item']);
27  $identification = $GS->identification()->fromSerializedIdentification($unhash);
28  $item = $GS->collector()->mainmenu()->getSingleItemFromFilter($identification);
29 
30  if ($item instanceof Lost) {
31  $f = $DIC->ui()->factory();
32  $component = $f->button()->bulky(
33  $f->symbol()->glyph()->login(),
34  $DIC->language()->txt('login'),
35  'login.php?client_id=' . rawurlencode(CLIENT_ID) . '&cmd=force_login&lang=' . $DIC->user()->getCurrentLanguage()
36  );
37  } else {
38  $component = $item->getTypeInformation()->getRenderer()->getComponentForItem($item, true);
39  }
40  echo $DIC->ui()->renderer()->renderAsync($component);
41  }
42 }
43 
44 if (php_sapi_name() !== 'cli') {
45  (new ContentRenderer())->run();
46 }
$_GET["client_id"]
Definition: webdav.php:30
const CONTEXT_WAC
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: gs_content.php:3
global $DIC
Definition: feed.php:28
static initILIAS()
ilias initialisation
const CLIENT_ID
Definition: constants.php:41
static init(string $a_type)
Init context by type.