ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
SystemStylesGlobalScreenToolProvider Class Reference

Provider for the Tree in the Main Bar Slate showing the UI Components. More...

+ Inheritance diagram for SystemStylesGlobalScreenToolProvider:
+ Collaboration diagram for SystemStylesGlobalScreenToolProvider:

Public Member Functions

 isInterestedInContexts ()
 
 getToolsForContextStack (\ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts $called_contexts)
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\Tool\Provider\AbstractDynamicToolProvider
 __construct (Container $dic)
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\Tool\Provider\DynamicToolProvider
 getToolsForContextStack (CalledContexts $called_contexts)
 

Protected Member Functions

 buildTreeAsTool ()
 
 getUITree ()
 
- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\Tool\Provider\AbstractDynamicToolProvider
ToolIdentificationProviderInterface $identification_provider
 
ContextCollection $context_collection
 
ToolFactory $factory
 

Detailed Description

Provider for the Tree in the Main Bar Slate showing the UI Components.

Definition at line 30 of file SystemStylesGlobalScreenToolProvider.php.

Member Function Documentation

◆ buildTreeAsTool()

SystemStylesGlobalScreenToolProvider::buildTreeAsTool ( )
protected

, replace this with a proper Tree Slate

Definition at line 58 of file SystemStylesGlobalScreenToolProvider.php.

References $id, factory(), and getUITree().

Referenced by getToolsForContextStack().

58  : Tool
59  {
60  $id_generator = function ($id) {
61  return $this->identification_provider->contextAwareIdentifier($id);
62  };
63 
64  $title = $this->dic->language()->txt('documentation');
65  $icon = $this->dic->ui()->factory()->symbol()->icon()->standard('stys', $title);
66 
70  return $this->factory
71  ->tool($id_generator('system_styles_tree'))
72  ->withTitle($title)
73  ->withSymbol($icon)
74  ->withContent($this->dic->ui()->factory()->legacy()->content($this->dic->ui()->renderer()->render($this->getUITree())));
75  }
factory()
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getToolsForContextStack()

SystemStylesGlobalScreenToolProvider::getToolsForContextStack ( \ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts  $called_contexts)

Definition at line 43 of file SystemStylesGlobalScreenToolProvider.php.

References buildTreeAsTool(), and ilSystemStyleDocumentationGUI\SHOW_TREE.

45  : array {
46  $last_context = $called_contexts->getLast();
47 
48  if ($last_context) {
49  $additional_data = $last_context->getAdditionalData();
50  if ($additional_data->is(ilSystemStyleDocumentationGUI::SHOW_TREE, true)) {
51  return [$this->buildTreeAsTool()];
52  }
53  }
54 
55  return [];
56  }
+ Here is the call graph for this function:

◆ getUITree()

SystemStylesGlobalScreenToolProvider::getUITree ( )
protected

Definition at line 77 of file SystemStylesGlobalScreenToolProvider.php.

References Vendor\Package\$f, ILIAS\UI\examples\Layout\Page\Standard\$refinery, and ILIAS\UI\examples\Layout\Page\Standard\$request_wrapper.

Referenced by buildTreeAsTool().

77  : Tree
78  {
79  $entries = new Entries();
80  $entries->addEntriesFromArray(require ilKitchenSinkDataCollectedObjective::PATH());
81 
82  $parent_class_hierarchy = ['ilAdministrationGUI',
83  'ilObjStyleSettingsGUI',
84  'ilSystemStyleMainGUI',
85  'ilSystemStyleDocumentationGUI'
86  ];
87 
88  $parent_link = $this->dic->ctrl()->getLinkTargetByClass($parent_class_hierarchy, 'entries');
89  $parent_uri = new URI(ILIAS_HTTP_PATH . '/' . $parent_link);
90 
91  $refinery = $this->dic->refinery();
92  $request_wrapper = $this->dic->http()->wrapper()->query();
93  $current_opened_node_id = '';
94  if ($request_wrapper->has('node_id')) {
95  $current_opened_node_id = $request_wrapper->retrieve('node_id', $refinery->kindlyTo()->string());
96  }
97 
98  $recursion = new KSDocumentationTreeRecursion($entries, $parent_uri, $current_opened_node_id);
99  $f = $this->dic->ui()->factory();
100 
101  return $f->tree()->expandable('Label', $recursion)
102  ->withData([$entries->getRootEntry()])
103  ->withHighlightOnNodeClick(true);
104  }
Tree Recursion, putting Entries into a Tree.
This describes a Tree Control.
Definition: Tree.php:28
+ Here is the caller graph for this function:

◆ isInterestedInContexts()


The documentation for this class was generated from the following file: