ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 ()
 
 exportSelectedNodes ()
 

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

References $DIC, ILIAS\MetaData\Repository\Validation\Data\__construct(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\tabs(), and ILIAS\Repository\toolbar().

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  }
global $DIC
Definition: feed.php:28
__construct(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ cancelDelete()

ilSkillRootGUI::cancelDelete ( )

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

References $ctrl, and ilCtrl\redirect().

137  : void
138  {
139  $ilCtrl = $this->ctrl;
140 
141  if ($this->requested_tmpmode) {
142  $ilCtrl->redirect($this, "listTemplates");
143  } else {
144  $ilCtrl->redirect($this, "listSkills");
145  }
146  }
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:

◆ executeCommand()

ilSkillRootGUI::executeCommand ( )

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

References $ctrl, $tabs, and $tpl.

59  : void
60  {
61  $ilCtrl = $this->ctrl;
62  $tpl = $this->tpl;
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

◆ 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 186 of file class.ilSkillRootGUI.php.

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

186  : void
187  {
188  $tpl = $this->tpl;
189  $lng = $this->lng;
190  $ilCtrl = $this->ctrl;
191  $ilTabs = $this->tabs;
192 
193  $form = $this->initInputForm();
194  if ($form->checkInput()) {
195  $imp = new ilImport();
196  $conf = $imp->getConfig("Services/Skill");
197  $conf->setSkillTreeId($this->skill_tree_id);
198  $imp->importEntity($_FILES["import_file"]["tmp_name"], $_FILES["import_file"]["name"], "skmg", "Services/Skill");
199 
200  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
201  $ilCtrl->redirect($this, "listSkills");
202  } else {
203  $ilTabs->activateTab("skills");
206  }
207  }
ilGlobalTemplateInterface $tpl
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
Import class.
setContent(string $a_html)
Sets content for standard template.
+ Here is the call graph for this function:

◆ initInputForm()

ilSkillRootGUI::initInputForm ( )

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

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

Referenced by importSkills(), and showImportForm().

165  {
166  $lng = $this->lng;
167  $ilCtrl = $this->ctrl;
168 
169  $form = new ilPropertyFormGUI();
170 
171  $fi = new ilFileInputGUI($lng->txt("skmg_input_file"), "import_file");
172  $fi->setSuffixes(array("zip"));
173  $fi->setRequired(true);
174  $form->addItem($fi);
175 
176  // save and cancel commands
177  $form->addCommandButton("importSkills", $lng->txt("import"));
178  $form->addCommandButton("listSkills", $lng->txt("cancel"));
179 
180  $form->setTitle($lng->txt("skmg_import_skills"));
181  $form->setFormAction($ilCtrl->getFormAction($this));
182 
183  return $form;
184  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This class represents a file property in a property form.
setSuffixes(array $a_suffixes)
setFormAction(string $a_formaction)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listSkills()

ilSkillRootGUI::listSkills ( )

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

References $ctrl, $lng, $tabs, $toolbar, $tpl, ilSkillCategoryGUI\addCreationButtons(), ilSkillTreeNodeGUI\getParentGUI(), ilSkillCatTableGUI\MODE_SCAT, ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

106  : void
107  {
108  $tpl = $this->tpl;
109  $ilToolbar = $this->toolbar;
110  $ilCtrl = $this->ctrl;
111  $lng = $this->lng;
112  $ilTabs = $this->tabs;
113 
114  $skmg_set = new ilSetting("skmg");
115  $enable_skmg = $skmg_set->get("enable_skmg");
116  if (!$enable_skmg) {
117  $this->tpl->setOnScreenMessage('info', $lng->txt("skmg_skill_management_deactivated"));
118  }
119 
120  $this->getParentGUI()->showTree(false, $this, "listSkills");
121  $ilTabs->activateTab("skills");
122 
123  if ($this->tree_access_manager->hasManageCompetencesPermission()) {
125  }
126 
127  $table = new ilSkillCatTableGUI(
128  $this,
129  "listSkills",
130  $this->requested_node_id,
132  );
133 
134  $tpl->setContent($table->getHTML());
135  }
ilGlobalTemplateInterface $tpl
txt(string $a_topic, string $a_default_lang_fallback_mod="")
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.
+ Here is the call graph for this function:

◆ listTemplates()

ilSkillRootGUI::listTemplates ( )

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

References $ctrl, $lng, $tabs, $toolbar, $tpl, ilSkillTemplateCategoryGUI\addCreationButtons(), ilSkillTreeNodeGUI\getParentGUI(), ilSkillCatTableGUI\MODE_SCTP, ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

75  : void
76  {
77  $tpl = $this->tpl;
78  $ilToolbar = $this->toolbar;
79  $ilCtrl = $this->ctrl;
80  $lng = $this->lng;
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 = new ilSkillCatTableGUI(
97  $this,
98  "listTemplates",
99  $this->requested_node_id,
101  );
102 
103  $tpl->setContent($table->getHTML());
104  }
ilGlobalTemplateInterface $tpl
txt(string $a_topic, string $a_default_lang_fallback_mod="")
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.
+ Here is the call graph for this function:

◆ showImportForm()

ilSkillRootGUI::showImportForm ( )

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

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

148  : void
149  {
150  $tpl = $this->tpl;
151  $ilTabs = $this->tabs;
152  $lng = $this->lng;
153  $ctrl = $this->ctrl;
154 
155  $ilTabs->setBackTarget(
156  $lng->txt("back"),
157  $ctrl->getLinkTarget($this, "listSkills")
158  );
159 
160  $ilTabs->activateTab("skills");
161  $tpl->setContent($this->initInputForm()->getHTML());
162  }
ilGlobalTemplateInterface $tpl
txt(string $a_topic, string $a_default_lang_fallback_mod="")
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.
getLinkTarget(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
+ 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: