ILIAS  release_8 Revision v8.24
ilSkillGSToolProvider Class Reference

Workspace GS tool provider. More...

+ Inheritance diagram for ilSkillGSToolProvider:
+ Collaboration diagram for ilSkillGSToolProvider:

Public Member Functions

 isInterestedInContexts ()
 @inheritDoc More...
 
 getToolsForContextStack (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 (Container $dic)
 @inheritDoc More...
 
 getFullyQualifiedClassName ()
 @inheritDoc More...
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getToolsForContextStack (CalledContexts $called_contexts)
 
 isInterestedInContexts ()
 

Data Fields

const SHOW_SKILL_TREE = 'show_skill_tree'
 
const SHOW_TEMPLATE_TREE = 'show_template_tree'
 
const SKILL_TREE_ID = 'skill_tree_id'
 

Private Member Functions

 getSkillTree (int $tree_id)
 
 getTemplateTree (int $tree_id)
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\Tool\Provider\AbstractDynamicToolProvider
ToolIdentificationProviderInterface $identification_provider
 
ContextCollection $context_collection
 
ToolFactory $factory
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
Container $dic
 

Detailed Description

Workspace GS tool provider.

Author
Alex Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..com

Definition at line 30 of file class.ilSkillGSToolProvider.php.

Member Function Documentation

◆ getSkillTree()

ilSkillGSToolProvider::getSkillTree ( int  $tree_id)
private

Definition at line 87 of file class.ilSkillGSToolProvider.php.

87 : string
88 {
89 $exp = new ilSkillTreeExplorerGUI(["ilAdministrationGUI", "ilObjSkillManagementGUI",
90 "ilSkillTreeAdminGUI", "ilObjSkillTreeGUI"], "showTree", $tree_id);
91
92 return $exp->getHTML();
93 }
Explorer class that works on tree objects (Services/Tree)

Referenced by getToolsForContextStack().

+ Here is the caller graph for this function:

◆ getTemplateTree()

ilSkillGSToolProvider::getTemplateTree ( int  $tree_id)
private

Definition at line 95 of file class.ilSkillGSToolProvider.php.

95 : string
96 {
97 $exp = new ilSkillTemplateTreeExplorerGUI(["ilAdministrationGUI", "ilObjSkillManagementGUI",
98 "ilSkillTreeAdminGUI", "ilObjSkillTreeGUI"], "showTree", $tree_id);
99
100 return $exp->getHTML();
101 }
Explorer class that works on tree objects (Services/Tree)

Referenced by getToolsForContextStack().

+ Here is the caller graph for this function:

◆ getToolsForContextStack()

ilSkillGSToolProvider::getToolsForContextStack ( CalledContexts  $called_contexts)

@inheritDoc

Implements ILIAS\GlobalScreen\Scope\Tool\Provider\DynamicToolProvider.

Definition at line 49 of file class.ilSkillGSToolProvider.php.

49 : array
50 {
51 $lang = $this->dic->language();
52
53 $lang->loadLanguageModule("skill");
54
55 $title = $lang->txt("skmg_skills");
56
57 $tools = [];
58
59 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(\ilUtil::getImagePath("icon_skmg.svg"), $title);
60
61 $additional_data = $called_contexts->current()->getAdditionalData();
62 if ($additional_data->is(self::SHOW_SKILL_TREE, true)) {
63 $tree_id = $additional_data->get(self::SKILL_TREE_ID);
64 $tools[] = $this->factory->tool($this->identification_provider->contextAwareIdentifier("tree"))
65 ->withTitle($title)
66 ->withSymbol($icon)
67 ->withContentWrapper(function () use ($tree_id): Legacy {
68 return $this->dic->ui()->factory()->legacy($this->getSkillTree($tree_id));
69 });
70 }
71
72 $title = $lang->txt("skmg_skill_templates");
73 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(\ilUtil::getImagePath("icon_skmg.svg"), $title);
74
75 if ($additional_data->is(self::SHOW_TEMPLATE_TREE, true)) {
76 $tree_id = $additional_data->get(self::SKILL_TREE_ID);
77 $tools[] = $this->factory->tool($this->identification_provider->contextAwareIdentifier("tree"))
78 ->withTitle("Templates")
79 ->withSymbol($icon)
80 ->withContentWrapper(function () use ($tree_id): Legacy {
81 return $this->dic->ui()->factory()->legacy($this->getTemplateTree($tree_id));
82 });
83 }
84 return $tools;
85 }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
$lang
Definition: xapiexit.php:26

References $lang, ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current(), ilUtil\getImagePath(), getSkillTree(), getTemplateTree(), and ILIAS\UI\examples\MainControls\Slate\Legacy\legacy().

+ Here is the call graph for this function:

◆ isInterestedInContexts()

ilSkillGSToolProvider::isInterestedInContexts ( )

Field Documentation

◆ SHOW_SKILL_TREE

const ilSkillGSToolProvider::SHOW_SKILL_TREE = 'show_skill_tree'

◆ SHOW_TEMPLATE_TREE

const ilSkillGSToolProvider::SHOW_TEMPLATE_TREE = 'show_template_tree'

◆ SKILL_TREE_ID

const ilSkillGSToolProvider::SKILL_TREE_ID = 'skill_tree_id'

Definition at line 34 of file class.ilSkillGSToolProvider.php.

Referenced by ilObjSkillTreeGUI\showTree().


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