ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
class.ilHelpViewLayoutProvider.php
Go to the documentation of this file.
1<?php
2
27use ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\Hasher;
31
37{
38 use Hasher;
39 use ilHelpDisplayed;
40
42 {
43 return $this->context_collection->main();
44 }
45
49 public function getMainBarModification(
50 CalledContexts $screen_context_stack
52 global $DIC;
53
54 $f = $DIC->ui()->factory();
55 $ttm = $DIC->help()->internal()->domain()->tooltips();
56 if (!$ttm->areTooltipsVisible()) {
57 return null;
58 }
59
60
61 $this->globalScreen()->collector()->mainmenu()->collectOnce();
62 foreach ($this->globalScreen()->collector()->mainmenu()->getRawItems() as $item) {
63 if (!($item instanceof ILIAS\GlobalScreen\Scope\MainMenu\Factory\TopItem\TopParentItem)
64 && !($item instanceof ILIAS\GlobalScreen\Scope\MainMenu\Factory\TopItem\TopLinkItem)
65 && !$ttm->areSubMenuTooltipsVisible()
66 ) {
67 continue;
68 }
69 if ($item instanceof isDecorateable) {
70 $p = $item->getProviderIdentification();
71
72 $tt_text = $ttm->getMainMenuTooltip($p->getInternalIdentifier());
73 if ($tt_text !== "") {
74 $item->withTopics(...$DIC->ui()->factory()->helpTopics($tt_text));
75 }
76 }
77 }
78
79 return null;
80 }
81
82 public function getMetaBarModification(CalledContexts $screen_context_stack): ?MetaBarModification
83 {
84 global $DIC;
85
86 $ttm = $DIC->help()->internal()->domain()->tooltips();
87
88 if (!$this->showHelpTool() && !$ttm->isTooltipIdentifierVisible()) {
89 return null;
90 }
91
92 // add id mapping of all main menu items to gui
93 $this->globalScreen()->collector()->metaBar()->collectOnce();
94 foreach ($this->globalScreen()->collector()->metaBar()->getRawItems() as $item) {
95 if ($item instanceof isDecorateable) {
96 $p = $item->getProviderIdentification();
97
98 $tt_text = $ttm->getMainMenuTooltip($p->getInternalIdentifier());
99 if ($tt_text !== "") {
100 $item->withTopics(...$DIC->ui()->factory()->helpTopics($tt_text));
101 }
102 }
103 }
104 return null;
105 }
106
107}
HTML export view layout provider, hides main and meta bar.
getMainBarModification(CalledContexts $screen_context_stack)
No main bar in HTML exports.
getMetaBarModification(CalledContexts $screen_context_stack)
@inheritDoc
A component is the most general form of an entity in the UI.
Definition: Component.php:28
This describes a symbol.
Definition: Symbol.php:30
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $DIC
Definition: shib_login.php:26