ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilSkillTreeNodeFactory Class Reference

Factory for skill tree nodes. More...

+ Collaboration diagram for ilSkillTreeNodeFactory:

Static Public Member Functions

static getInstance ($a_id=0)
 

Detailed Description

Factory for skill tree nodes.

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

Definition at line 20 of file class.ilSkillTreeNodeFactory.php.

Member Function Documentation

◆ getInstance()

static ilSkillTreeNodeFactory::getInstance (   $a_id = 0)
static

Definition at line 22 of file class.ilSkillTreeNodeFactory.php.

23 {
24 global $ilias, $ilDB;
25
26 $query = "SELECT * FROM skl_tree_node WHERE obj_id = ".
27 $ilDB->quote($a_id, "integer");
28 $obj_set = $ilDB->query($query);
29 $obj_rec = $ilDB->fetchAssoc($obj_set);
30 $obj = null;
31
32 switch($obj_rec["type"])
33 {
34 case "skll":
35 $obj = new ilBasicSkill();
36 $obj->setId($obj_rec["obj_id"]);
37 $obj->setDataRecord($obj_rec);
38 $obj->read();
39 break;
40
41 case "scat":
42 $obj = new ilSkillCategory();
43 $obj->setId($obj_rec["obj_id"]);
44 $obj->setDataRecord($obj_rec);
45 $obj->read();
46 break;
47
48 case "sktp":
49 $obj = new ilBasicSkillTemplate();
50 $obj->setId($obj_rec["obj_id"]);
51 $obj->setDataRecord($obj_rec);
52 $obj->read();
53 break;
54
55 case "sctp":
56 $obj = new ilSkillTemplateCategory();
57 $obj->setId($obj_rec["obj_id"]);
58 $obj->setDataRecord($obj_rec);
59 $obj->read();
60 break;
61
62 case "skrt":
63 $obj = new ilSkillRoot();
64 $obj->setId($obj_rec["obj_id"]);
65 $obj->setDataRecord($obj_rec);
66 $obj->read();
67 break;
68
69 case "sktr":
70 $obj = new ilSkillTemplateReference();
71 $obj->setId($obj_rec["obj_id"]);
72 $obj->setDataRecord($obj_rec);
73 $obj->read();
74 break;
75 }
76 return $obj;
77 }
Skill root node.
global $ilDB

References $ilDB, and $query.

Referenced by ilCOPageHTMLExport\collectPageElements(), ilObjSkillManagementGUI\confirmedDelete(), ilObjSkillManagementGUI\deleteNodes(), ilObjSkillManagement\executeDragDrop(), ilSelfEvaluationSimpleTableGUI\getLevels(), ilSkillAssignMaterialsTableGUI\getLevels(), ilPersonalSkillsGUI\getSkillHTML(), ilSkillTreeNodeGUI\readNodeObject(), ilObjSkillManagementGUI\saveAllTemplateTitles(), and ilObjSkillManagementGUI\saveAllTitles().

+ Here is the caller graph for this function:

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