ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
DashboardLayoutProvider.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
ILIAS\DI\Container
;
22
use
ILIAS\GlobalScreen\Scope\Layout\Provider\AbstractModificationProvider
;
23
use
ILIAS\GlobalScreen\Scope\Layout\Provider\ModificationProvider
;
24
use
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection
;
25
use
ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts
;
26
use
ILIAS\GlobalScreen\Scope\Layout\Factory\MainBarModification
;
27
use
ILIAS\UI\Component\MainControls\MainBar
;
28
use
ILIAS\GlobalScreen\ScreenContext\AdditionalData\Collection
;
29
30
class
DashboardLayoutProvider
extends
AbstractModificationProvider
implements
ModificationProvider
31
{
32
protected
?
Collection
$data_collection
;
33
34
public
function
__construct
(
Container
$dic
)
35
{
36
$dic
->ui()->mainTemplate()->addJavaScript(
'assets/js/modal-confirmation.js'
);
37
$dic
->ui()->mainTemplate()->addJavaScript(
'assets/js/manual-sorting.js'
);
38
parent::__construct
(
$dic
);
39
}
40
41
public
function
isInterestedInContexts
():
ContextCollection
42
{
43
return
$this->context_collection->
desktop
();
44
}
45
46
public
function
getMainBarModification
(
CalledContexts
$screen_context_stack): ?
MainBarModification
47
{
48
$this->data_collection = $screen_context_stack->
current
()->getAdditionalData();
49
if
(!$this->data_collection->is(
ilDashboardGUI::DISENGAGE_MAINBAR
,
true
)) {
50
return
null
;
51
}
52
53
return
$this->
globalScreen
()->layout()->factory()->mainbar()
54
->withModification(
55
function
(?
MainBar
$mainbar): ?
MainBar
{
56
return
$mainbar?->
withActive
($mainbar::NONE_ACTIVE);
57
}
58
)
59
->withLowPriority();
60
}
61
}
DashboardLayoutProvider
Definition:
DashboardLayoutProvider.php:31
DashboardLayoutProvider\$data_collection
Collection $data_collection
Definition:
DashboardLayoutProvider.php:32
DashboardLayoutProvider\isInterestedInContexts
isInterestedInContexts()
Definition:
DashboardLayoutProvider.php:41
DashboardLayoutProvider\getMainBarModification
getMainBarModification(CalledContexts $screen_context_stack)
@inheritDoc
Definition:
DashboardLayoutProvider.php:46
DashboardLayoutProvider\__construct
__construct(Container $dic)
@inheritDoc
Definition:
DashboardLayoutProvider.php:34
ILIAS\DI\Container
Customizing of pimple-DIC for ILIAS.
Definition:
Container.php:36
ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen
globalScreen()
Definition:
AbstractProvider.php:38
ILIAS\GlobalScreen\Scope\Layout\Factory\MainBarModification
Class MainBar.
Definition:
MainBarModification.php:30
ILIAS\GlobalScreen\Scope\Layout\Provider\AbstractModificationProvider
Class AbstractModificationProvider.
Definition:
AbstractModificationProvider.php:46
ILIAS\GlobalScreen\ScreenContext\AdditionalData\Collection
Class Collection.
Definition:
Collection.php:30
ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts
Definition:
CalledContexts.php:30
ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current
current()
Definition:
CalledContexts.php:33
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection
Definition:
ContextCollection.php:31
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\desktop
desktop()
Definition:
ContextCollection.php:100
ilDashboardGUI\DISENGAGE_MAINBAR
const DISENGAGE_MAINBAR
Definition:
class.ilDashboardGUI.php:43
ILIAS\GlobalScreen\Scope\Layout\Provider\ModificationProvider
Interface ModificationProvider.
Definition:
ModificationProvider.php:42
ILIAS\UI\Component\MainControls\MainBar
This describes the MainBar.
Definition:
MainBar.php:34
ILIAS\UI\Component\MainControls\MainBar\withActive
withActive(string $active)
$dic
$dic
Definition:
ltiresult.php:33
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Definition:
PluginProviderHelper.php:38
components
ILIAS
Dashboard
GlobalScreen
classes
DashboardLayoutProvider.php
Generated on Sat Oct 18 2025 23:02:54 for ILIAS by
1.9.4 (using
Doxyfile
)