ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
DashboardLayoutProvider.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
29
31{
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');
39 }
40
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}
getMainBarModification(CalledContexts $screen_context_stack)
@inheritDoc
__construct(Container $dic)
@inheritDoc
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
This describes the MainBar.
Definition: MainBar.php:34
$dic
Definition: ltiresult.php:33
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc