ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
SystemStylesGlobalScreenToolProvider.php
Go to the documentation of this file.
1 <?php declare(strict_types=1);
2 
4 
5 require_once("Services/Style/System/classes/Documentation/class.ilSystemStyleDocumentationGUI.php");
6 require_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)) {
37  $exp = new ilKSDocumentationExplorerGUI();
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 }
Class ChatMainBarProvider .
Class SystemStylesGlobalScreenToolProvider.
getToolsForContextStack(\ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts $called_contexts)