ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
DashboardLayoutProvider.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
28
30{
32
33 public function __construct(Container $dic)
34 {
35 $dic->ui()->mainTemplate()->addJavaScript('assets/js/modal-confirmation.js');
36 $dic->ui()->mainTemplate()->addJavaScript('assets/js/manual-sorting.js');
38 }
39
41 {
42 return $this->context_collection->desktop();
43 }
44
45 public function getMainBarModification(CalledContexts $screen_context_stack): ?MainBarModification
46 {
47 $this->data_collection = $screen_context_stack->current()->getAdditionalData();
48 if (!$this->data_collection->is(ilDashboardGUI::DISENGAGE_MAINBAR, true)) {
49 return null;
50 }
51
52 return $this->globalScreen()->layout()->factory()->mainbar()
53 ->withModification(
54 function (?MainBar $mainbar): ?MainBar {
55 return $mainbar?->withActive($mainbar::NONE_ACTIVE);
56 }
57 )
58 ->withLowPriority();
59 }
60}
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