ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilSkillRootGUI Class Reference

Skill root GUI class. More...

+ Inheritance diagram for ilSkillRootGUI:
+ Collaboration diagram for ilSkillRootGUI:

Public Member Functions

 __construct (Node\SkillTreeNodeManager $node_manager, int $a_node_id=0)
 
 getType ()
 
 executeCommand ()
 
 listTemplates ()
 
 listSkills ()
 
 cancelDelete ()
 
 showImportForm ()
 
 initInputForm ()
 
 importSkills ()
 
- Public Member Functions inherited from ilSkillTreeNodeGUI
 __construct (Node\SkillTreeNodeManager $node_manager, int $a_node_id=0)
 
 isInUse ()
 
 setParentGUI (object $a_parentgui)
 
 getParentGUI ()
 
 readNodeObject (int $a_node_id)
 Get node object instance. More...
 
 saveAllTitles ()
 
 deleteNodes ()
 Delete nodes in the hierarchy. More...
 
 cutItems ()
 Copy items to clipboard, then cut them from the current tree. More...
 
 copyItems ()
 Copy items to clipboard. More...
 
 cancelDelete ()
 
 confirmedDelete ()
 confirmed delete More...
 
 setSkillNodeDescription ()
 
 create ()
 Create skill tree node. More...
 
 addStatusInput (ilPropertyFormGUI $a_form)
 
 editProperties ()
 
 getPropertyValues ()
 Get property values for edit form. More...
 
 save ()
 Save skill tree node. More...
 
 afterSave ()
 
 update ()
 Update skill tree node. More...
 
 afterUpdate ()
 
 initForm (string $a_mode="edit")
 
 cancelSave ()
 
 redirectToParent (bool $a_tmp_mode=false)
 Redirect to parent (identified by current node_id) More...
 
 saveOrder ()
 
 insertBasicSkillClip ()
 
 insertSkillCategoryClip ()
 
 insertTemplateReferenceClip ()
 
 insertSkillTemplateClip ()
 
 insertTemplateCategoryClip ()
 
 setTitleIcon ()
 
 addUsageTab (ilTabsGUI $a_tabs)
 
 showUsage ()
 
 addObjectsTab (ilTabsGUI $a_tabs)
 
 showObjects ()
 

Protected Attributes

ilCtrl $ctrl
 
ilGlobalTemplateInterface $tpl
 
ilTabsGUI $tabs
 
ilToolbarGUI $toolbar
 
ilLanguage $lng
 
- Protected Attributes inherited from ilSkillTreeNodeGUI
ilCtrl $ctrl
 
ilLanguage $lng
 
ilLocatorGUI $locator
 
ilGlobalTemplateInterface $tpl
 
ilObjUser $user
 
ilTree $tree
 
ilPropertyFormGUI $form
 
UI Factory $ui_fac
 
UI Renderer $ui_ren
 
object $parentgui
 
int $tref_id = 0
 
Node SkillTreeNodeManager $skill_tree_node_manager
 
SkillTreeAccess $tree_access_manager
 
Table TableManager $table_manager
 
Usage SkillUsageManager $usage_manager
 
ilSkillTreeRepository $tree_repo
 
int $skill_tree_id = 0
 
ilTabsGUI $tabs
 
SkillAdminGUIRequest $admin_gui_request
 
SkillUIService $skill_ui_service
 
DataFactory $data_factory
 
ExportFactoryInterface $export_factory
 
int $requested_ref_id = 0
 
int $requested_node_id = 0
 
string $requested_backcmd = ""
 
bool $requested_tmpmode = false
 
int $base_skill_id = 0
 
array $requested_node_ids = []
 
array $requested_node_order = []
 

Additional Inherited Members

- Data Fields inherited from ilSkillTreeNodeGUI
object $node_object = null
 
bool $in_use = false
 
bool $use_checked = false
 
ilAccessHandler $access
 
- Protected Member Functions inherited from ilSkillTreeNodeGUI
 getSkillCategoryTable ()
 
 hasManagePermissionForCurrentMode ()
 

Detailed Description

Skill root GUI class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e @ilCtrl_isCalledBy ilSkillRootGUI: ilObjSkillManagementGUI, ilObjSkillTreeGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilSkillRootGUI::__construct ( Node\SkillTreeNodeManager  $node_manager,
int  $a_node_id = 0 
)

Reimplemented from ilSkillTreeNodeGUI.

Definition at line 38 of file class.ilSkillRootGUI.php.

39 {
40 global $DIC;
41
42 $this->ctrl = $DIC->ctrl();
43 $this->tpl = $DIC["tpl"];
44 $this->tabs = $DIC->tabs();
45 $this->toolbar = $DIC->toolbar();
46 $this->lng = $DIC->language();
47 $ilCtrl = $DIC->ctrl();
48
49 $ilCtrl->saveParameter($this, "node_id");
50
51 parent::__construct($node_manager, $a_node_id);
52 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\tabs(), and ILIAS\Repository\toolbar().

+ Here is the call graph for this function:

Member Function Documentation

◆ cancelDelete()

ilSkillRootGUI::cancelDelete ( )

Reimplemented from ilSkillTreeNodeGUI.

Definition at line 139 of file class.ilSkillRootGUI.php.

139 : void
140 {
141 $ilCtrl = $this->ctrl;
142
143 if ($this->requested_tmpmode) {
144 $ilCtrl->redirect($this, "listTemplates");
145 } else {
146 $ilCtrl->redirect($this, "listSkills");
147 }
148 }
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc

References $ctrl, and ilCtrl\redirect().

+ Here is the call graph for this function:

◆ executeCommand()

ilSkillRootGUI::executeCommand ( )

Definition at line 59 of file class.ilSkillRootGUI.php.

59 : void
60 {
61 $ilCtrl = $this->ctrl;
63 $ilTabs = $this->tabs;
64
65 $next_class = $ilCtrl->getNextClass($this);
66 $cmd = $ilCtrl->getCmd();
67
68 switch ($next_class) {
69 default:
70 $ret = $this->$cmd();
71 break;
72 }
73 }
ilGlobalTemplateInterface $tpl

References $ctrl, $tabs, and $tpl.

◆ getType()

ilSkillRootGUI::getType ( )

Definition at line 54 of file class.ilSkillRootGUI.php.

54 : string
55 {
56 return "skrt";
57 }

◆ importSkills()

ilSkillRootGUI::importSkills ( )

Definition at line 188 of file class.ilSkillRootGUI.php.

188 : void
189 {
192 $ilCtrl = $this->ctrl;
193 $ilTabs = $this->tabs;
194
195 $form = $this->initInputForm();
196 if ($form->checkInput()) {
197 $imp = new ilImport();
198 $conf = $imp->getConfig("components/ILIAS/Skill");
199 $conf->setSkillTreeId($this->skill_tree_id);
200 $imp->importEntity($_FILES["import_file"]["tmp_name"], $_FILES["import_file"]["name"], "skmg", "components/ILIAS/Skill");
201
202 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
203 $ilCtrl->redirect($this, "listSkills");
204 } else {
205 $ilTabs->activateTab("skills");
208 }
209 }
Import class.
txt(string|LanguageIdentifier $a_topic, ?int $n=null)
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.

References $ctrl, ilSkillTreeNodeGUI\$form, $lng, $tabs, $tpl, ilPropertyFormGUI\checkInput(), ilPropertyFormGUI\getHTML(), initInputForm(), ILIAS\UICore\GlobalTemplate\setContent(), ilPropertyFormGUI\setValuesByPost(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ initInputForm()

ilSkillRootGUI::initInputForm ( )

Definition at line 166 of file class.ilSkillRootGUI.php.

167 {
169 $ilCtrl = $this->ctrl;
170
171 $form = new ilPropertyFormGUI();
172
173 $fi = new ilFileInputGUI($lng->txt("skmg_input_file"), "import_file");
174 $fi->setSuffixes(array("zip"));
175 $fi->setRequired(true);
176 $form->addItem($fi);
177
178 // save and cancel commands
179 $form->addCommandButton("importSkills", $lng->txt("import"));
180 $form->addCommandButton("listSkills", $lng->txt("cancel"));
181
182 $form->setTitle($lng->txt("skmg_import_skills"));
183 $form->setFormAction($ilCtrl->getFormAction($this));
184
185 return $form;
186 }
This class represents a file property in a property form.
setFormAction(string $a_formaction)
This class represents a property form user interface.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")

References $ctrl, ilSkillTreeNodeGUI\$form, $lng, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilFormGUI\setFormAction(), ilPropertyFormGUI\setTitle(), and ilLanguage\txt().

Referenced by importSkills(), and showImportForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listSkills()

ilSkillRootGUI::listSkills ( )

Definition at line 107 of file class.ilSkillRootGUI.php.

107 : void
108 {
110 $ilToolbar = $this->toolbar;
111 $ilCtrl = $this->ctrl;
113 $ilTabs = $this->tabs;
114
115 $skmg_set = new ilSetting("skmg");
116 $enable_skmg = $skmg_set->get("enable_skmg");
117 if (!$enable_skmg) {
118 $this->tpl->setOnScreenMessage('info', $lng->txt("skmg_skill_management_deactivated"));
119 }
120
121 $this->getParentGUI()->showTree(false, $this, "listSkills");
122 $ilTabs->activateTab("skills");
123
124 if ($this->tree_access_manager->hasManageCompetencesPermission()) {
126 }
127
128 $table = $this->table_manager->getSkillCategoryTable(
129 $this,
130 $this->requested_node_id,
131 SkillCategoryTable::MODE_SCAT,
132 0,
133 $this->skill_tree_node_manager
134 )->getComponent();
135
136 $tpl->setContent($this->ui_ren->render($table));
137 }
ILIAS Setting Class.

References $ctrl, $lng, $tabs, $toolbar, $tpl, ilSkillCategoryGUI\addCreationButtons(), ilSkillTreeNodeGUI\getParentGUI(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ listTemplates()

ilSkillRootGUI::listTemplates ( )

Definition at line 75 of file class.ilSkillRootGUI.php.

75 : void
76 {
78 $ilToolbar = $this->toolbar;
79 $ilCtrl = $this->ctrl;
81 $ilTabs = $this->tabs;
82
83 $skmg_set = new ilSetting("skmg");
84 $enable_skmg = $skmg_set->get("enable_skmg");
85 if (!$enable_skmg) {
86 $this->tpl->setOnScreenMessage('info', $lng->txt("skmg_skill_management_deactivated"));
87 }
88
89 $this->getParentGUI()->showTree(true, $this, "listTemplates");
90 $ilTabs->activateTab("skill_templates");
91
92 if ($this->tree_access_manager->hasManageCompetenceTemplatesPermission()) {
94 }
95
96 $table = $this->table_manager->getSkillCategoryTable(
97 $this,
98 $this->requested_node_id,
99 SkillCategoryTable::MODE_SCTP,
100 0,
101 $this->skill_tree_node_manager
102 )->getComponent();
103
104 $tpl->setContent($this->ui_ren->render($table));
105 }

References $ctrl, $lng, $tabs, $toolbar, $tpl, ilSkillTemplateCategoryGUI\addCreationButtons(), ilSkillTreeNodeGUI\getParentGUI(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ showImportForm()

ilSkillRootGUI::showImportForm ( )

Definition at line 150 of file class.ilSkillRootGUI.php.

150 : void
151 {
153 $ilTabs = $this->tabs;
156
157 $ilTabs->setBackTarget(
158 $lng->txt("back"),
159 $ctrl->getLinkTarget($this, "listSkills")
160 );
161
162 $ilTabs->activateTab("skills");
163 $tpl->setContent($this->initInputForm()->getHTML());
164 }
getLinkTarget(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc

References $ctrl, $lng, $tabs, $tpl, ilCtrl\getLinkTarget(), initInputForm(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilSkillRootGUI::$ctrl
protected

◆ $lng

ilLanguage ilSkillRootGUI::$lng
protected

◆ $tabs

ilTabsGUI ilSkillRootGUI::$tabs
protected

◆ $toolbar

ilToolbarGUI ilSkillRootGUI::$toolbar
protected

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

Referenced by listSkills(), and listTemplates().

◆ $tpl

ilGlobalTemplateInterface ilSkillRootGUI::$tpl
protected

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