ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
StartUpSequenceLayoutProvider.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
30
32{
33 public const FORCED_STARTUP_STEP = 'forced_startup_step';
34
35 protected function isForcedStartupStep(CalledContexts $called_contexts): bool
36 {
37 return $called_contexts->current()->getAdditionalData()->is(self::FORCED_STARTUP_STEP, true);
38 }
39
41 {
42 return $this->context_collection->main();
43 }
44
45 public function getMainBarModification(CalledContexts $screen_context_stack): ?MainBarModification
46 {
47 if ($this->isForcedStartupStep($screen_context_stack)) {
48 $main_bar = $this->globalScreen()->layout()->factory()->mainbar();
49 $main_bar = $main_bar->withModification(function (?MainBar $current): ?MainBar {
50 return null;
51 });
52
53 return $main_bar->withPriority(\ILIAS\GlobalScreen\Scope\Layout\Factory\LayoutModification::PRIORITY_HIGH);
54 }
55
56 return null;
57 }
58
59 public function getMetaBarModification(CalledContexts $screen_context_stack): ?MetaBarModification
60 {
61 if ($this->isForcedStartupStep($screen_context_stack)) {
62 $meta_bar = $this->globalScreen()->layout()->factory()->metabar();
63 $meta_bar = $meta_bar->withModification(function (?MetaBar $current): ?MetaBar {
64 return null;
65 });
66
67 return $meta_bar->withPriority(\ILIAS\GlobalScreen\Scope\Layout\Factory\LayoutModification::PRIORITY_HIGH);
68 }
69
70 return null;
71 }
72}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
getMetaBarModification(CalledContexts $screen_context_stack)
@inheritDoc
getMainBarModification(CalledContexts $screen_context_stack)
@inheritDoc
This describes the MainBar.
Definition: MainBar.php:34
This describes the MetaBar.
Definition: MetaBar.php:33
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.