ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
DashboardLayoutProvider.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
29 
31 {
33 
34  public function __construct(Container $dic)
35  {
36  $dic->ui()->mainTemplate()->addJavaScript('Services/Dashboard/Block/js/modal-confirmation.js');
37  parent::__construct($dic);
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 }
This describes the MainBar.
Definition: MainBar.php:33
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
__construct(VocabulariesInterface $vocabularies)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getMainBarModification(CalledContexts $screen_context_stack)
ui()
Get the interface to get services from UI framework.
Definition: Container.php:127