ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
gs_content.php
Go to the documentation of this file.
1
<?php
2
19
namespace
ILIAS\GlobalScreen\Client
;
20
21
require_once(__DIR__ .
'/../vendor/composer/vendor/autoload.php'
);
22
23
use
ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\Hasher
;
24
use
ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\Lost
;
25
26
class
ContentRenderer
27
{
28
use
Hasher
;
29
30
public
function
run
()
31
{
32
\ilContext::init
(\
ilContext::CONTEXT_WAC
);
33
\ilInitialisation::initILIAS
();
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
}
ilContext\CONTEXT_WAC
const CONTEXT_WAC
Definition:
class.ilContext.php:43
ILIAS\GlobalScreen\Client
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
callback_handler.php:3
Lost
Hasher
ilInitialisation\initILIAS
static initILIAS()
ilias initialisation
Definition:
class.ilInitialisation.php:1153
GuzzleHttp\Client\ContentRenderer
Definition:
gs_content.php:26
Vendor\Package\$f
$f
Definition:
example_cleaned.php:49
CLIENT_ID
const CLIENT_ID
Definition:
constants.php:41
$DIC
global $DIC
Definition:
shib_login.php:25
$_GET
$_GET['cmd']
Definition:
lti.php:26
Hasher
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilContext\init
static init(string $a_type)
Init context by type.
Definition:
class.ilContext.php:52
GuzzleHttp\Client\ContentRenderer\run
run()
Definition:
gs_content.php:30
components
ILIAS
GlobalScreen
resources
gs_content.php
Generated on Wed Sep 10 2025 15:15:40 for ILIAS by
1.8.13 (using
Doxyfile
)