ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
gs_content.php
Go to the documentation of this file.
1 <?php
2 
20 
21 require_once(__DIR__ . '/../vendor/composer/vendor/autoload.php');
22 require_once(__DIR__ . '/../artifacts/bootstrap_default.php');
23 
26 
28 {
29  use Hasher;
30 
31  public function run(): void
32  {
33  global $DIC;
34 
35  $GS = $DIC->globalScreen();
36 
37  $GS->collector()->mainmenu()->collectStructure();
38  $GS->collector()->mainmenu()->filterItemsByVisibilty(true);
39  $GS->collector()->mainmenu()->prepareItemsForUIRepresentation();
40 
41  $unhash = $this->unhash($_GET['item']);
42  $identification = $GS->identification()->fromSerializedIdentification($unhash);
43  $item = $GS->collector()->mainmenu()->getSingleItemFromFilter($identification);
44 
45  if ($item instanceof Lost) {
46  $f = $DIC->ui()->factory();
47  $component = $f->button()->bulky(
48  $f->symbol()->glyph()->login(),
49  $DIC->language()->txt('login'),
50  'login.php?client_id=' . rawurlencode(CLIENT_ID) . '&cmd=force_login&lang=' . $DIC->user()->getCurrentLanguage()
51  );
52  } else {
53  $component = $item->getTypeInformation()->getRenderer()->getComponentForItem($item, true);
54  }
55  echo $DIC->ui()->renderer()->renderAsync($component);
56  }
57 }
58 
59 if (php_sapi_name() !== 'cli') {
61  entry_point('ILIAS Legacy Initialisation Adapter');
62  (new ContentRenderer())->run();
63 }
$_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...
const CLIENT_ID
Definition: constants.php:41
global $DIC
Definition: shib_login.php:22
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.
entry_point(string $name)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: result1.php:21