ILIAS  release_7 Revision v7.30-3-g800a261c036
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'
 

Private Member Functions

 getSkillTree ()
 
 getTemplateTree ()
 

Additional Inherited Members

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

Detailed Description

Workspace GS tool provider.

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

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

Member Function Documentation

◆ getSkillTree()

ilSkillGSToolProvider::getSkillTree ( )
private
Returns
string

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

83 : string
84 {
85 $exp = new ilSkillTreeExplorerGUI(["ilAdministrationGUI", "ilObjSkillManagementGUI"], "showTree");
86
87 return $exp->getHTML();
88 }
Explorer class that works on tree objects (Services/Tree)

Referenced by getToolsForContextStack().

+ Here is the caller graph for this function:

◆ getTemplateTree()

ilSkillGSToolProvider::getTemplateTree ( )
private
Returns
string

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

94 : string
95 {
96 $exp = new ilSkillTemplateTreeExplorerGUI(["ilAdministrationGUI", "ilObjSkillManagementGUI"], "showTree");
97
98 return $exp->getHTML();
99 }
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 30 of file class.ilSkillGSToolProvider.php.

30 : array
31 {
32 $lang = $this->dic->language();
33
34 $lang->loadLanguageModule("skill");
35
36 $title = $lang->txt("skmg_skills");
37
38 $tools = [];
39
40 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(\ilUtil::getImagePath("outlined/icon_skmg.svg"), $title);
41
42
43 $additional_data = $called_contexts->current()->getAdditionalData();
44 if ($additional_data->is(self::SHOW_SKILL_TREE, true)) {
45 $iff = function ($id) {
46 return $this->identification_provider->contextAwareIdentifier($id);
47 };
48 $l = function (string $content) {
49 return $this->dic->ui()->factory()->legacy($content);
50 };
51 $tools[] = $this->factory->tool($iff("tree"))
52 ->withTitle($title)
53 ->withSymbol($icon)
54 ->withContentWrapper(function () use ($l) {
55 return $l($this->getSkillTree());
56 });
57 }
58
59 $title = $lang->txt("skmg_skill_templates");
60 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(\ilUtil::getImagePath("outlined/icon_skmg.svg"), $title);
61
62 if ($additional_data->is(self::SHOW_TEMPLATE_TREE, true)) {
63 $iff = function ($id) {
64 return $this->identification_provider->contextAwareIdentifier($id);
65 };
66 $l = function (string $content) {
67 return $this->dic->ui()->factory()->legacy($content);
68 };
69 $tools[] = $this->factory->tool($iff("tree"))
70 ->withTitle("Templates")
71 ->withSymbol($icon)
72 ->withContentWrapper(function () use ($l) {
73 return $l($this->getTemplateTree());
74 });
75 }
76 return $tools;
77 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$lang
Definition: xapiexit.php:8

References $lang, ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current(), ilUtil\getImagePath(), getSkillTree(), and getTemplateTree().

+ Here is the call graph for this function:

◆ isInterestedInContexts()

ilSkillGSToolProvider::isInterestedInContexts ( )

Field Documentation

◆ SHOW_SKILL_TREE

const ilSkillGSToolProvider::SHOW_SKILL_TREE = 'show_skill_tree'

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

Referenced by ilObjSkillManagementGUI\showTree().

◆ SHOW_TEMPLATE_TREE

const ilSkillGSToolProvider::SHOW_TEMPLATE_TREE = 'show_template_tree'

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

Referenced by ilObjSkillManagementGUI\showTree().


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