ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 @inheritDoc More...
 
 getToolsForContextStack (\ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts $called_contexts)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\Tool\Provider\AbstractDynamicToolProvider
 __construct (Container $dic)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\Tool\Provider\DynamicToolProvider
 getToolsForContextStack (CalledContexts $called_contexts)
 
 isInterestedInContexts ()
 

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

@Todo, replace this with a proper Tree Slate

Definition at line 58 of file SystemStylesGlobalScreenToolProvider.php.

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 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
factory()

References $id, factory(), and ILIAS\GlobalScreen\Scope\Footer\Factory\withTitle().

Referenced by getToolsForContextStack().

+ 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)

@inheritDoc

Definition at line 43 of file SystemStylesGlobalScreenToolProvider.php.

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 }

References buildTreeAsTool(), and ilSystemStyleDocumentationGUI\SHOW_TREE.

+ Here is the call graph for this function:

◆ getUITree()

SystemStylesGlobalScreenToolProvider::getUITree ( )
protected

Definition at line 77 of file SystemStylesGlobalScreenToolProvider.php.

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 }
The scope of this class is split ilias-conform URI's into components.
Definition: URI.php:35
Tree Recursion, putting Entries into a Tree.
This describes a Tree Control.
Definition: Tree.php:29

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

◆ isInterestedInContexts()


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