ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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('assets/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
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(Container $dic, ilPlugin $plugin)
getMainBarModification(CalledContexts $screen_context_stack)
$dic
Definition: result.php:31
ui()
Get the interface to get services from UI framework.
Definition: Container.php:127