ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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.

References $DIC, $ilDB, and $query.

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

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

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