ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
gs_content.php
Go to the documentation of this file.
1 <?php
2 
20 
21 require_once(__DIR__ . '/../vendor/composer/vendor/autoload.php');
22 
25 
27 {
28  use Hasher;
29 
30  public function run()
31  {
34  global $DIC;
35 
36  $GS = $DIC->globalScreen();
37 
38  $GS->collector()->mainmenu()->collectStructure();
39  $GS->collector()->mainmenu()->filterItemsByVisibilty(true);
40  $GS->collector()->mainmenu()->prepareItemsForUIRepresentation();
41 
42  $unhash = $this->unhash($_GET['item']);
43  $identification = $GS->identification()->fromSerializedIdentification($unhash);
44  $item = $GS->collector()->mainmenu()->getSingleItemFromFilter($identification);
45 
46  if ($item instanceof Lost) {
47  $f = $DIC->ui()->factory();
48  $component = $f->button()->bulky(
49  $f->symbol()->glyph()->login(),
50  $DIC->language()->txt('login'),
51  'login.php?client_id=' . rawurlencode(CLIENT_ID) . '&cmd=force_login&lang=' . $DIC->user()->getCurrentLanguage()
52  );
53  } else {
54  $component = $item->getTypeInformation()->getRenderer()->getComponentForItem($item, true);
55  }
56  echo $DIC->ui()->renderer()->renderAsync($component);
57  }
58 }
59 
60 if (php_sapi_name() !== 'cli') {
61  (new ContentRenderer())->run();
62 }
const CONTEXT_WAC
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static initILIAS()
ilias initialisation
const CLIENT_ID
Definition: constants.php:41
global $DIC
Definition: shib_login.php:25
$_GET['cmd']
Definition: lti.php:26
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static init(string $a_type)
Init context by type.