ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 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
 

Detailed Description

Workspace GS tool provider.

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

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

Member Function Documentation

◆ getSkillTree()

ilSkillGSToolProvider::getSkillTree ( int  $tree_id)
private

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

88 : string
89 {
90 $exp = new ilSkillTreeExplorerGUI(["ilAdministrationGUI", "ilObjSkillManagementGUI",
91 "ilSkillTreeAdminGUI", "ilObjSkillTreeGUI"], "showTree", $tree_id);
92
93 return $exp->getHTML();
94 }
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 96 of file class.ilSkillGSToolProvider.php.

96 : string
97 {
98 $exp = new ilSkillTemplateTreeExplorerGUI(["ilAdministrationGUI", "ilObjSkillManagementGUI",
99 "ilSkillTreeAdminGUI", "ilObjSkillTreeGUI"], "showTree", $tree_id);
100
101 return $exp->getHTML();
102 }
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 50 of file class.ilSkillGSToolProvider.php.

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

References $lang, ILIAS\GlobalScreen\ScreenContext\Stack\CalledContexts\current(), factory(), 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'

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

Referenced by ilObjSkillTreeGUI\showTree().

◆ SHOW_TEMPLATE_TREE

const ilSkillGSToolProvider::SHOW_TEMPLATE_TREE = 'show_template_tree'

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

Referenced by ilObjSkillTreeGUI\showTree().

◆ SKILL_TREE_ID

const ilSkillGSToolProvider::SKILL_TREE_ID = 'skill_tree_id'

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

Referenced by ilObjSkillTreeGUI\showTree().


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