ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilSkillTreeNodeGUI Class Reference

Basic GUI class for skill tree nodes. More...

+ Inheritance diagram for ilSkillTreeNodeGUI:
+ Collaboration diagram for ilSkillTreeNodeGUI:

Public Member Functions

 __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 ()
 

Data Fields

object $node_object = null
 
bool $in_use = false
 
bool $use_checked = false
 
ilAccessHandler $access
 

Protected Attributes

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 = []
 

Detailed Description

Basic GUI class for skill tree nodes.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e

Definition at line 37 of file class.ilSkillTreeNodeGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented in ilBasicSkillGUI, ilSkillCategoryGUI, ilSkillRootGUI, and ilSkillTemplateReferenceGUI.

Definition at line 81 of file class.ilSkillTreeNodeGUI.php.

82 {
83 global $DIC;
84
85 $this->data_factory = new DataFactory();
86 $this->export_factory = new ExportFactory();
87
88 $this->ctrl = $DIC->ctrl();
89 $this->lng = $DIC->language();
90 $this->locator = $DIC["ilLocator"];
91 $this->tpl = $DIC["tpl"];
92 $this->user = $DIC->user();
93 $this->ui_fac = $DIC->ui()->factory();
94 $this->ui_ren = $DIC->ui()->renderer();
95 $ilAccess = $DIC->access();
96 $this->tree = $DIC->repositoryTree();
97 $this->tabs = $DIC->tabs();
98 $this->admin_gui_request = $DIC->skills()->internal()->gui()->admin_request();
99 $this->skill_ui_service = $DIC->skills()->ui();
100
101 $this->node_object = null;
102 $this->access = $ilAccess;
103
104 $this->requested_ref_id = $this->admin_gui_request->getRefId();
105 $this->requested_node_id = $this->admin_gui_request->getNodeId();
106 $this->requested_backcmd = $this->admin_gui_request->getBackCommand();
107 $this->requested_tmpmode = $this->admin_gui_request->getTemplateMode();
108 $this->requested_node_ids = $this->admin_gui_request->getNodeIds();
109 $this->requested_node_order = $this->admin_gui_request->getOrder();
110
111 $this->skill_tree_node_manager = $node_manager;
112 $this->tree_access_manager = $DIC->skills()->internal()->manager()->getTreeAccessManager($this->requested_ref_id);
113 $this->table_manager = $DIC->skills()->internal()->manager()->getTableManager();
114 $this->usage_manager = $DIC->skills()->internal()->manager()->getUsageManager();
115 $this->tree_repo = $DIC->skills()->internal()->repo()->getTreeRepo();
116 $this->skill_tree_id = $this->tree_repo->getTreeIdForNodeId($this->requested_node_id);
117
118 if ($a_node_id > 0 &&
119 $this->getType() == ilSkillTreeNode::_lookupType($a_node_id)) {
120 $this->readNodeObject($a_node_id);
121 }
122 }
readNodeObject(int $a_node_id)
Get node object instance.
static _lookupType(int $a_obj_id)
global $DIC
Definition: shib_login.php:26

References $DIC, ilSkillTreeNode\_lookupType(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\locator(), readNodeObject(), ILIAS\Repository\tabs(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ addObjectsTab()

ilSkillTreeNodeGUI::addObjectsTab ( ilTabsGUI  $a_tabs)

Definition at line 591 of file class.ilSkillTreeNodeGUI.php.

591 : void
592 {
594 $ilCtrl = $this->ctrl;
595
596 $a_tabs->addTab(
597 "objects",
598 $lng->txt("skmg_assigned_objects"),
599 $ilCtrl->getLinkTarget($this, "showObjects")
600 );
601 }
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...
addTab(string $a_id, string $a_text, string $a_link, string $a_frame="")
Add a Tab.

References $ctrl, $lng, ilTabsGUI\addTab(), and ilLanguage\txt().

Referenced by ilSkillTemplateReferenceGUI\setTabs(), ilBasicSkillGUI\setTabs(), and ilBasicSkillTemplateGUI\setTabs().

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

◆ addStatusInput()

ilSkillTreeNodeGUI::addStatusInput ( ilPropertyFormGUI  $a_form)

Definition at line 306 of file class.ilSkillTreeNodeGUI.php.

306 : void
307 {
309
310 // status
311 $radg = new ilRadioGroupInputGUI($lng->txt("skmg_status"), "status");
312 foreach (ilSkillTreeNode::getAllStatus() as $k => $op) {
313 $op = new ilRadioOption($op, (string) $k, ilSkillTreeNode::getStatusInfo($k));
314 $radg->addOption($op);
315 }
316 $radg->setValue((string) ilSkillTreeNode::STATUS_PUBLISH);
317 $a_form->addItem($radg);
318 }
This class represents a property in a property form.
This class represents an option in a radio group.
static getStatusInfo(int $a_status)
static getAllStatus()
Get all status as array, key is value, value is lang text.

References $lng, ilPropertyFormGUI\addItem(), ilSkillTreeNode\getAllStatus(), ilSkillTreeNode\getStatusInfo(), ilSkillTreeNode\STATUS_PUBLISH, and ilLanguage\txt().

Referenced by ilBasicSkillGUI\initForm(), ilSkillCategoryGUI\initForm(), and ilSkillTemplateReferenceGUI\initForm().

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

◆ addUsageTab()

ilSkillTreeNodeGUI::addUsageTab ( ilTabsGUI  $a_tabs)

Definition at line 559 of file class.ilSkillTreeNodeGUI.php.

559 : void
560 {
562 $ilCtrl = $this->ctrl;
563
564 $a_tabs->addTab(
565 "usage",
566 $lng->txt("skmg_usage"),
567 $ilCtrl->getLinkTarget($this, "showUsage")
568 );
569 }

References $ctrl, $lng, ilTabsGUI\addTab(), and ilLanguage\txt().

Referenced by ilSkillTemplateReferenceGUI\setTabs(), ilSkillCategoryGUI\setTabs(), ilSkillTemplateCategoryGUI\setTabs(), ilBasicSkillGUI\setTabs(), and ilBasicSkillTemplateGUI\setTabs().

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

◆ afterSave()

ilSkillTreeNodeGUI::afterSave ( )

Reimplemented in ilBasicSkillGUI, ilBasicSkillTemplateGUI, ilSkillTemplateCategoryGUI, and ilSkillTemplateReferenceGUI.

Definition at line 380 of file class.ilSkillTreeNodeGUI.php.

380 : void
381 {
382 $this->redirectToParent();
383 }
redirectToParent(bool $a_tmp_mode=false)
Redirect to parent (identified by current node_id)

References redirectToParent().

Referenced by save().

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

◆ afterUpdate()

ilSkillTreeNodeGUI::afterUpdate ( )

Definition at line 411 of file class.ilSkillTreeNodeGUI.php.

411 : void
412 {
413 $ilCtrl = $this->ctrl;
414
415 $ilCtrl->redirect($this, "editProperties");
416 }
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc

References $ctrl, and ilCtrl\redirect().

Referenced by update().

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

◆ cancelDelete()

ilSkillTreeNodeGUI::cancelDelete ( )

Reimplemented in ilSkillRootGUI.

Definition at line 252 of file class.ilSkillTreeNodeGUI.php.

252 : void
253 {
254 $ilCtrl = $this->ctrl;
255
256 $this->redirectToParent();
257 }

References $ctrl, and redirectToParent().

+ Here is the call graph for this function:

◆ cancelSave()

ilSkillTreeNodeGUI::cancelSave ( )

Definition at line 451 of file class.ilSkillTreeNodeGUI.php.

451 : void
452 {
453 $this->redirectToParent();
454 }

References redirectToParent().

+ Here is the call graph for this function:

◆ confirmedDelete()

ilSkillTreeNodeGUI::confirmedDelete ( )

confirmed delete

Definition at line 262 of file class.ilSkillTreeNodeGUI.php.

262 : void
263 {
264 $ilCtrl = $this->ctrl;
265
266 if (!$this->tree_access_manager->hasManageCompetencesPermission()) {
267 return;
268 }
269
270 $this->getParentGUI()->confirmedDelete(false);
271 $this->skill_tree_node_manager->saveChildsOrder(
272 $this->requested_node_id,
273 [],
274 $this->requested_tmpmode
275 );
276
277 $this->redirectToParent();
278 }

References $ctrl, getParentGUI(), and redirectToParent().

+ Here is the call graph for this function:

◆ copyItems()

ilSkillTreeNodeGUI::copyItems ( )

Copy items to clipboard.

Definition at line 222 of file class.ilSkillTreeNodeGUI.php.

222 : void
223 {
224 $ilCtrl = $this->ctrl;
226
227 if (empty($this->requested_node_ids)) {
228 $this->redirectToParent();
229 }
230
232 $todel = []; // delete IDs < 0 (needed for non-js editing)
233 foreach ($items as $k => $item) {
234 if ($item < 0) {
235 $todel[] = $k;
236 }
237 }
238 foreach ($todel as $k) {
239 unset($items[$k]);
240 }
242 $this->tpl->setOnScreenMessage('info', $lng->txt("skmg_insert_please_choose_one_type_only"), true);
243 $this->redirectToParent();
244 }
245 $this->skill_tree_node_manager->clipboardCopy($items);
246
247 $this->tpl->setOnScreenMessage('info', $lng->txt("skmg_selected_items_have_been_copied"), true);
248
249 $this->redirectToParent();
250 }
static uniqueTypesCheck(array $a_items)
Check for unique types.

References $ctrl, $lng, $requested_node_ids, redirectToParent(), ilLanguage\txt(), and ilSkillTreeNode\uniqueTypesCheck().

+ Here is the call graph for this function:

◆ create()

ilSkillTreeNodeGUI::create ( )

Create skill tree node.

Definition at line 290 of file class.ilSkillTreeNodeGUI.php.

290 : void
291 {
295 $ilCtrl = $this->ctrl;
296
298 $lng->txt("back"),
299 $ilCtrl->getLinkTarget($this, "redirectToParent")
300 );
301
302 $this->initForm("create");
303 $tpl->setContent($this->form->getHTML());
304 }
ilGlobalTemplateInterface $tpl
initForm(string $a_mode="edit")
setBackTarget(string $a_title, string $a_target, string $a_frame="")
setContent(string $a_html)
Sets content for standard template.
form( $class_path, string $cmd, string $submit_caption="")

References $ctrl, $lng, $tabs, $tpl, ILIAS\Repository\form(), initForm(), ilTabsGUI\setBackTarget(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ cutItems()

ilSkillTreeNodeGUI::cutItems ( )

Copy items to clipboard, then cut them from the current tree.

Definition at line 182 of file class.ilSkillTreeNodeGUI.php.

182 : void
183 {
185
186 if (empty($this->requested_node_ids)) {
187 $this->redirectToParent();
188 }
189
191 $todel = []; // delete IDs < 0 (needed for non-js editing)
192 foreach ($items as $k => $item) {
193 if ($item < 0) {
194 $todel[] = $k;
195 }
196 }
197 foreach ($todel as $k) {
198 unset($items[$k]);
199 }
200
202 $this->tpl->setOnScreenMessage('info', $lng->txt("skmg_insert_please_choose_one_type_only"), true);
203 $this->redirectToParent();
204 }
205
206 $this->skill_tree_node_manager->clipboardCut($items);
207
208 $this->tpl->setOnScreenMessage('info', $lng->txt("skmg_selected_items_have_been_cut"), true);
209
210 $this->skill_tree_node_manager->saveChildsOrder(
211 $this->requested_node_id,
212 [],
213 $this->requested_tmpmode
214 );
215
216 $this->redirectToParent();
217 }

References $lng, $requested_node_ids, redirectToParent(), ilLanguage\txt(), and ilSkillTreeNode\uniqueTypesCheck().

+ Here is the call graph for this function:

◆ deleteNodes()

ilSkillTreeNodeGUI::deleteNodes ( )

Delete nodes in the hierarchy.

Definition at line 171 of file class.ilSkillTreeNodeGUI.php.

171 : void
172 {
173 $ilCtrl = $this->ctrl;
174
175 $ilCtrl->setParameter($this, "backcmd", $this->requested_backcmd);
176 $this->getParentGUI()->deleteNodes($this);
177 }
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc

References $ctrl, getParentGUI(), and ilCtrl\setParameter().

+ Here is the call graph for this function:

◆ editProperties()

ilSkillTreeNodeGUI::editProperties ( )

Reimplemented in ilBasicSkillGUI, ilSkillCategoryGUI, ilSkillTemplateCategoryGUI, and ilSkillTemplateReferenceGUI.

Definition at line 320 of file class.ilSkillTreeNodeGUI.php.

320 : void
321 {
324
325 if ($this->isInUse()) {
326 $this->tpl->setOnScreenMessage('info', $lng->txt("skmg_skill_in_use"));
327 }
328
329 $this->initForm("edit");
330 $this->getPropertyValues();
331 $tpl->setContent($this->form->getHTML());
332 }
getPropertyValues()
Get property values for edit form.

References $lng, $tpl, ILIAS\Repository\form(), getPropertyValues(), initForm(), isInUse(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ getParentGUI()

ilSkillTreeNodeGUI::getParentGUI ( )

Definition at line 147 of file class.ilSkillTreeNodeGUI.php.

147 : object
148 {
149 return $this->parentgui;
150 }

References $parentgui.

Referenced by confirmedDelete(), deleteNodes(), ilSkillRootGUI\listSkills(), ilSkillRootGUI\listTemplates(), and saveAllTitles().

+ Here is the caller graph for this function:

◆ getPropertyValues()

ilSkillTreeNodeGUI::getPropertyValues ( )

Get property values for edit form.

Definition at line 337 of file class.ilSkillTreeNodeGUI.php.

337 : void
338 {
339 $values = [];
340
341 $values["title"] = $this->node_object->getTitle();
342 $values["description"] = $this->node_object->getDescription();
343 $values["order_nr"] = $this->node_object->getOrderNr();
344 $values["self_eval"] = $this->node_object->getSelfEvaluation();
345 $values["status"] = (string) $this->node_object->getStatus();
346
347 $this->form->setValuesByArray($values);
348 }

References ILIAS\Repository\form().

Referenced by editProperties().

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

◆ initForm()

ilSkillTreeNodeGUI::initForm ( string  $a_mode = "edit")

Reimplemented in ilBasicSkillGUI, ilBasicSkillTemplateGUI, ilSkillCategoryGUI, ilSkillTemplateCategoryGUI, and ilSkillTemplateReferenceGUI.

Definition at line 418 of file class.ilSkillTreeNodeGUI.php.

418 : void
419 {
421 $ilCtrl = $this->ctrl;
422
423 $this->form = new ilPropertyFormGUI();
424
425 // title
426 $ti = new ilTextInputGUI($lng->txt("title"), "title");
427 $ti->setMaxLength(200);
428 $ti->setSize(50);
429 $ti->setRequired(true);
430 $this->form->addItem($ti);
431
432 // description
433 $ta = new ilTextAreaInputGUI($lng->txt("description"), "description");
434 $ta->setRows(5);
435 $this->form->addItem($ta);
436
437 // save and cancel commands
438 if ($a_mode == "create") {
439 $this->form->addCommandButton("save", $lng->txt("save"));
440 $this->form->addCommandButton("cancelSave", $lng->txt("cancel"));
441 $this->form->setTitle($lng->txt("skmg_create_" . $this->getType()));
442 } else {
443 $this->form->addCommandButton("update", $lng->txt("save"));
444 $this->form->setTitle($lng->txt("skmg_edit_" . $this->getType()));
445 }
446
447 $ilCtrl->setParameter($this, "node_id", $this->requested_node_id);
448 $this->form->setFormAction($ilCtrl->getFormAction($this));
449 }
This class represents a property form user interface.
This class represents a text area property in a property form.
This class represents a text property in a property form.

References $ctrl, $lng, ILIAS\Repository\form(), and ilLanguage\txt().

Referenced by create(), editProperties(), save(), and update().

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

◆ insertBasicSkillClip()

ilSkillTreeNodeGUI::insertBasicSkillClip ( )

Definition at line 508 of file class.ilSkillTreeNodeGUI.php.

508 : void
509 {
510 $this->skill_tree_node_manager->insertItemsFromClip("skll", $this->requested_node_id);
511 $this->redirectToParent();
512 }

References redirectToParent().

+ Here is the call graph for this function:

◆ insertSkillCategoryClip()

ilSkillTreeNodeGUI::insertSkillCategoryClip ( )

Definition at line 514 of file class.ilSkillTreeNodeGUI.php.

514 : void
515 {
516 $this->skill_tree_node_manager->insertItemsFromClip("scat", $this->requested_node_id);
517 $this->redirectToParent();
518 }

References redirectToParent().

+ Here is the call graph for this function:

◆ insertSkillTemplateClip()

ilSkillTreeNodeGUI::insertSkillTemplateClip ( )

Definition at line 526 of file class.ilSkillTreeNodeGUI.php.

526 : void
527 {
528 $this->skill_tree_node_manager->insertItemsFromClip("sktp", $this->requested_node_id);
529 $this->redirectToParent();
530 }

References redirectToParent().

+ Here is the call graph for this function:

◆ insertTemplateCategoryClip()

ilSkillTreeNodeGUI::insertTemplateCategoryClip ( )

Definition at line 532 of file class.ilSkillTreeNodeGUI.php.

532 : void
533 {
534 $this->skill_tree_node_manager->insertItemsFromClip("sctp", $this->requested_node_id);
535 $this->redirectToParent();
536 }

References redirectToParent().

+ Here is the call graph for this function:

◆ insertTemplateReferenceClip()

ilSkillTreeNodeGUI::insertTemplateReferenceClip ( )

Definition at line 520 of file class.ilSkillTreeNodeGUI.php.

520 : void
521 {
522 $this->skill_tree_node_manager->insertItemsFromClip("sktr", $this->requested_node_id);
523 $this->redirectToParent();
524 }

References redirectToParent().

+ Here is the call graph for this function:

◆ isInUse()

ilSkillTreeNodeGUI::isInUse ( )

Definition at line 124 of file class.ilSkillTreeNodeGUI.php.

124 : bool
125 {
126 if (!is_object($this->node_object)) {
127 return false;
128 }
129 if ($this->use_checked) {
130 return $this->in_use;
131 }
132 $cskill_ids = ilSkillTreeNode::getAllCSkillIdsForNodeIds(array($this->node_object->getId()));
133 $usages = $this->usage_manager->getAllUsagesInfoOfSubtrees($cskill_ids);
134 if (count($usages) > 0) {
135 $this->in_use = true;
136 } else {
137 $this->in_use = false;
138 }
139 return $this->in_use;
140 }
static getAllCSkillIdsForNodeIds(array $a_node_ids)
Get all possible common skill IDs for node IDs.

References $in_use, and ilSkillTreeNode\getAllCSkillIdsForNodeIds().

Referenced by ilBasicSkillGUI\edit(), ilBasicSkillTemplateGUI\edit(), ilBasicSkillGUI\editLevel(), editProperties(), ilSkillCategoryGUI\listItems(), ilSkillTemplateCategoryGUI\listItems(), and ilSkillTemplateReferenceGUI\listItems().

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

◆ readNodeObject()

ilSkillTreeNodeGUI::readNodeObject ( int  $a_node_id)

Get node object instance.

Definition at line 155 of file class.ilSkillTreeNodeGUI.php.

155 : void
156 {
157 $this->node_object = ilSkillTreeNodeFactory::getInstance($a_node_id);
158 }

References ilSkillTreeNodeFactory\getInstance().

Referenced by __construct().

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

◆ redirectToParent()

ilSkillTreeNodeGUI::redirectToParent ( bool  $a_tmp_mode = false)

Redirect to parent (identified by current node_id)

Reimplemented in ilBasicSkillGUI, ilBasicSkillTemplateGUI, ilSkillCategoryGUI, ilSkillTemplateCategoryGUI, and ilSkillTemplateReferenceGUI.

Definition at line 459 of file class.ilSkillTreeNodeGUI.php.

459 : void
460 {
461 $ilCtrl = $this->ctrl;
462
463 if ($this->requested_tmpmode) {
464 $a_tmp_mode = true;
465 }
466
467 $t = ilSkillTreeNode::_lookupType($this->requested_node_id);
468
469 switch ($t) {
470 case "skrt":
471 $ilCtrl->setParameterByClass("ilskillrootgui", "node_id", $this->requested_node_id);
472 if ($a_tmp_mode) {
473 $ilCtrl->redirectByClass("ilskillrootgui", "listTemplates");
474 } else {
475 $ilCtrl->redirectByClass("ilskillrootgui", "listSkills");
476 }
477 break;
478
479 case "sctp":
480 $ilCtrl->setParameterByClass("ilskilltemplatecategorygui", "node_id", $this->requested_node_id);
481 $ilCtrl->redirectByClass("ilskilltemplatecategorygui", "listItems");
482 break;
483
484 case "scat":
485 $ilCtrl->setParameterByClass("ilskillcategorygui", "node_id", $this->requested_node_id);
486 $ilCtrl->redirectByClass("ilskillcategorygui", "listItems");
487 break;
488 }
489 }

References $ctrl, and ilSkillTreeNode\_lookupType().

Referenced by afterSave(), cancelDelete(), cancelSave(), confirmedDelete(), copyItems(), cutItems(), insertBasicSkillClip(), insertSkillCategoryClip(), insertSkillTemplateClip(), insertTemplateCategoryClip(), insertTemplateReferenceClip(), and saveOrder().

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

◆ save()

ilSkillTreeNodeGUI::save ( )

Save skill tree node.

Definition at line 354 of file class.ilSkillTreeNodeGUI.php.

354 : void
355 {
358 $ilCtrl = $this->ctrl;
359
360 if (!$this->tree_access_manager->hasManageCompetencesPermission()) {
361 return;
362 }
363
364 $this->initForm("create");
365 if ($this->form->checkInput()) {
366 $this->saveItem();
367 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
368 $this->skill_tree_node_manager->saveChildsOrder(
369 $this->requested_node_id,
370 [],
371 in_array($this->getType(), array("sktp", "sctp"))
372 );
373 $this->afterSave();
374 } else {
375 $this->form->setValuesByPost();
376 $tpl->setContent($this->form->getHTML());
377 }
378 }

References $ctrl, $lng, $tpl, afterSave(), ILIAS\Repository\form(), initForm(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ saveAllTitles()

ilSkillTreeNodeGUI::saveAllTitles ( )

Definition at line 160 of file class.ilSkillTreeNodeGUI.php.

160 : void
161 {
162 $ilCtrl = $this->ctrl;
163
164 $this->getParentGUI()->saveAllTitles(false);
165 $ilCtrl->redirect($this, "showOrganization");
166 }

References $ctrl, and getParentGUI().

+ Here is the call graph for this function:

◆ saveOrder()

ilSkillTreeNodeGUI::saveOrder ( )

Definition at line 491 of file class.ilSkillTreeNodeGUI.php.

491 : void
492 {
494
495 if (!$this->tree_access_manager->hasManageCompetencesPermission()) {
496 return;
497 }
498
499 $this->skill_tree_node_manager->saveChildsOrder(
500 $this->requested_node_id,
501 $this->requested_node_order,
502 $this->requested_tmpmode
503 );
504 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
505 $this->redirectToParent($this->requested_tmpmode);
506 }

References $lng, redirectToParent(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ setParentGUI()

ilSkillTreeNodeGUI::setParentGUI ( object  $a_parentgui)

Definition at line 142 of file class.ilSkillTreeNodeGUI.php.

142 : void
143 {
144 $this->parentgui = $a_parentgui;
145 }

◆ setSkillNodeDescription()

ilSkillTreeNodeGUI::setSkillNodeDescription ( )

Definition at line 280 of file class.ilSkillTreeNodeGUI.php.

280 : void
281 {
283
284 $tpl->setDescription($this->skill_tree_node_manager->getWrittenPath($this->node_object->getId(), $this->tref_id));
285 }
setDescription(string $a_descr)
Sets description below title in standard template.

References $tpl, and ILIAS\UICore\GlobalTemplate\setDescription().

Referenced by ilSkillTemplateReferenceGUI\setTabs(), ilSkillCategoryGUI\setTabs(), ilSkillTemplateCategoryGUI\setTabs(), ilBasicSkillGUI\setTabs(), and ilBasicSkillTemplateGUI\setTabs().

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

◆ setTitleIcon()

ilSkillTreeNodeGUI::setTitleIcon ( )

Definition at line 538 of file class.ilSkillTreeNodeGUI.php.

538 : void
539 {
541
542 $obj_id = (is_object($this->node_object))
543 ? $this->node_object->getId()
544 : 0;
547 $obj_id,
548 $this->getType(),
549 "",
551 )
552 );
553 }
static getIconPath(int $a_obj_id, string $a_type, string $a_size="", int $a_status=0)
static _lookupStatus(int $a_obj_id)
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon

References $tpl, ilSkillTreeNode\_lookupStatus(), ilSkillTreeNode\getIconPath(), and ILIAS\UICore\GlobalTemplate\setTitleIcon().

+ Here is the call graph for this function:

◆ showObjects()

ilSkillTreeNodeGUI::showObjects ( )

Reimplemented in ilBasicSkillTemplateGUI, and ilSkillTemplateReferenceGUI.

Definition at line 603 of file class.ilSkillTreeNodeGUI.php.

603 : void
604 {
606
607 $this->setTabs("objects");
608
609 $base_skill_id = ($this->base_skill_id > 0)
610 ? $this->base_skill_id
611 : $this->node_object->getId();
612 $objects = $this->usage_manager->getAssignedObjectsForSkill($base_skill_id, $this->tref_id);
613
614 $table = $this->table_manager->getAssignedObjectsTable(
615 $this,
616 $objects,
618 $this->tref_id
619 )->getComponent();
620
621 $tpl->setContent($this->ui_ren->render($table));
622 }

References $base_skill_id, $tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ showUsage()

ilSkillTreeNodeGUI::showUsage ( )

Reimplemented in ilBasicSkillTemplateGUI, and ilSkillTemplateCategoryGUI.

Definition at line 571 of file class.ilSkillTreeNodeGUI.php.

571 : void
572 {
574
575 $this->setTabs("usage");
576
577 $base_skill_id = ($this->base_skill_id > 0)
578 ? $this->base_skill_id
579 : $this->node_object->getId();
580 $usages = $this->usage_manager->getAllUsagesInfoOfSubtree($base_skill_id, $this->tref_id);
581
582 $html = "";
583 foreach ($usages as $k => $usage) {
584 $usages_ui = $this->skill_ui_service->getUsagesUI($k, $usage);
585 $html .= $usages_ui->render() . "<br/><br/>";
586 }
587
588 $tpl->setContent($html);
589 }

References $base_skill_id, $tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ update()

ilSkillTreeNodeGUI::update ( )

Update skill tree node.

Definition at line 390 of file class.ilSkillTreeNodeGUI.php.

390 : void
391 {
394 $ilCtrl = $this->ctrl;
395
396 if (!$this->tree_access_manager->hasManageCompetencesPermission()) {
397 return;
398 }
399
400 $this->initForm("edit");
401 if ($this->form->checkInput()) {
402 $this->updateItem();
403 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
404 $this->afterUpdate();
405 } else {
406 $this->form->setValuesByPost();
407 $tpl->setContent($this->form->getHTML());
408 }
409 }

References $ctrl, $lng, $tpl, afterUpdate(), ILIAS\Repository\form(), initForm(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilSkillTreeNodeGUI::$access

Definition at line 53 of file class.ilSkillTreeNodeGUI.php.

◆ $admin_gui_request

SkillAdminGUIRequest ilSkillTreeNodeGUI::$admin_gui_request
protected

◆ $base_skill_id

int ilSkillTreeNodeGUI::$base_skill_id = 0
protected

Definition at line 69 of file class.ilSkillTreeNodeGUI.php.

Referenced by showObjects(), and showUsage().

◆ $ctrl

◆ $data_factory

DataFactory ilSkillTreeNodeGUI::$data_factory
protected

Definition at line 63 of file class.ilSkillTreeNodeGUI.php.

◆ $export_factory

ExportFactoryInterface ilSkillTreeNodeGUI::$export_factory
protected

Definition at line 64 of file class.ilSkillTreeNodeGUI.php.

◆ $form

◆ $in_use

bool ilSkillTreeNodeGUI::$in_use = false

Definition at line 51 of file class.ilSkillTreeNodeGUI.php.

Referenced by isInUse().

◆ $lng

◆ $locator

ilLocatorGUI ilSkillTreeNodeGUI::$locator
protected

Definition at line 41 of file class.ilSkillTreeNodeGUI.php.

◆ $node_object

object ilSkillTreeNodeGUI::$node_object = null

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

◆ $parentgui

object ilSkillTreeNodeGUI::$parentgui
protected

Definition at line 48 of file class.ilSkillTreeNodeGUI.php.

Referenced by getParentGUI().

◆ $requested_backcmd

string ilSkillTreeNodeGUI::$requested_backcmd = ""
protected

Definition at line 67 of file class.ilSkillTreeNodeGUI.php.

◆ $requested_node_id

int ilSkillTreeNodeGUI::$requested_node_id = 0
protected

◆ $requested_node_ids

array ilSkillTreeNodeGUI::$requested_node_ids = []
protected

Definition at line 74 of file class.ilSkillTreeNodeGUI.php.

Referenced by copyItems(), and cutItems().

◆ $requested_node_order

array ilSkillTreeNodeGUI::$requested_node_order = []
protected

Definition at line 79 of file class.ilSkillTreeNodeGUI.php.

◆ $requested_ref_id

int ilSkillTreeNodeGUI::$requested_ref_id = 0
protected

Definition at line 65 of file class.ilSkillTreeNodeGUI.php.

◆ $requested_tmpmode

bool ilSkillTreeNodeGUI::$requested_tmpmode = false
protected

Definition at line 68 of file class.ilSkillTreeNodeGUI.php.

◆ $skill_tree_id

int ilSkillTreeNodeGUI::$skill_tree_id = 0
protected

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

◆ $skill_tree_node_manager

Node SkillTreeNodeManager ilSkillTreeNodeGUI::$skill_tree_node_manager
protected

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

◆ $skill_ui_service

SkillUIService ilSkillTreeNodeGUI::$skill_ui_service
protected

Definition at line 62 of file class.ilSkillTreeNodeGUI.php.

◆ $table_manager

Table TableManager ilSkillTreeNodeGUI::$table_manager
protected

Definition at line 56 of file class.ilSkillTreeNodeGUI.php.

◆ $tabs

ilTabsGUI ilSkillTreeNodeGUI::$tabs
protected

Definition at line 60 of file class.ilSkillTreeNodeGUI.php.

Referenced by create().

◆ $tpl

◆ $tree

ilTree ilSkillTreeNodeGUI::$tree
protected

Definition at line 44 of file class.ilSkillTreeNodeGUI.php.

◆ $tree_access_manager

SkillTreeAccess ilSkillTreeNodeGUI::$tree_access_manager
protected

Definition at line 55 of file class.ilSkillTreeNodeGUI.php.

◆ $tree_repo

ilSkillTreeRepository ilSkillTreeNodeGUI::$tree_repo
protected

Definition at line 58 of file class.ilSkillTreeNodeGUI.php.

◆ $tref_id

int ilSkillTreeNodeGUI::$tref_id = 0
protected

Definition at line 50 of file class.ilSkillTreeNodeGUI.php.

◆ $ui_fac

UI Factory ilSkillTreeNodeGUI::$ui_fac
protected

Definition at line 46 of file class.ilSkillTreeNodeGUI.php.

◆ $ui_ren

UI Renderer ilSkillTreeNodeGUI::$ui_ren
protected

Definition at line 47 of file class.ilSkillTreeNodeGUI.php.

◆ $usage_manager

Usage SkillUsageManager ilSkillTreeNodeGUI::$usage_manager
protected

Definition at line 57 of file class.ilSkillTreeNodeGUI.php.

◆ $use_checked

bool ilSkillTreeNodeGUI::$use_checked = false

Definition at line 52 of file class.ilSkillTreeNodeGUI.php.

◆ $user

ilObjUser ilSkillTreeNodeGUI::$user
protected

Definition at line 43 of file class.ilSkillTreeNodeGUI.php.


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