ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
SystemStylesGlobalScreenToolProvider.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
4
5require_once("Services/Style/System/classes/Documentation/class.ilSystemStyleDocumentationGUI.php");
6require_once("Services/Style/System/classes/Documentation/class.ilKSDocumentationExplorerGUI.php");
7
13{
14 const SHOW_MAIL_FOLDERS_TOOL = 'show_mail_folders_tool';
15
19 public function isInterestedInContexts() : \ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection
20 {
21 return $this->context_collection->administration();
22 }
23
27 public function getToolsForContextStack(\ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts $called_contexts) : array
28 {
29 $identification = function ($id) {
30 return $this->identification_provider->contextAwareIdentifier($id);
31 };
32
33 $tools = [];
34
35 $additional_data = $called_contexts->getLast()->getAdditionalData();
36 if ($additional_data->is(ilSystemStyleDocumentationGUI::SHOW_TREE, true)) {
38
39 $title = $this->dic->language()->txt('documentation');
40 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard('stys', $title)->withIsOutlined(true);
41
42 $tools[] = $this->factory
43 ->tool($identification('system_styles_tree'))
44 ->withTitle($title)
45 ->withSymbol($icon)
46 ->withContent($this->dic->ui()->factory()->legacy($exp->getHTML(true)));
47 }
48
49 return $tools;
50 }
51}
An exception for terminatinating execution or to throw for unit testing.
Class SystemStylesGlobalScreenToolProvider.
getToolsForContextStack(\ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts $called_contexts)
@inheritDoc
Class ChatMainBarProvider \MainMenu\Provider.