ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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

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

Member Function Documentation

◆ getInstance()

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

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

References $DIC, $ilDB, and $query.

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

13  {
14  global $DIC;
15 
16  $ilDB = $DIC->database();
17 
18  $query = "SELECT * FROM skl_tree_node WHERE obj_id = " .
19  $ilDB->quote($a_id, "integer");
20  $obj_set = $ilDB->query($query);
21  $obj_rec = $ilDB->fetchAssoc($obj_set);
22  $obj = null;
23 
24  switch ($obj_rec["type"]) {
25  case "skll":
26  $obj = new ilBasicSkill();
27  $obj->setId($obj_rec["obj_id"]);
28  $obj->setDataRecord($obj_rec);
29  $obj->read();
30  break;
31 
32  case "scat":
33  $obj = new ilSkillCategory();
34  $obj->setId($obj_rec["obj_id"]);
35  $obj->setDataRecord($obj_rec);
36  $obj->read();
37  break;
38 
39  case "sktp":
40  $obj = new ilBasicSkillTemplate();
41  $obj->setId($obj_rec["obj_id"]);
42  $obj->setDataRecord($obj_rec);
43  $obj->read();
44  break;
45 
46  case "sctp":
47  $obj = new ilSkillTemplateCategory();
48  $obj->setId($obj_rec["obj_id"]);
49  $obj->setDataRecord($obj_rec);
50  $obj->read();
51  break;
52 
53  case "skrt":
54  $obj = new ilSkillRoot();
55  $obj->setId($obj_rec["obj_id"]);
56  $obj->setDataRecord($obj_rec);
57  $obj->read();
58  break;
59 
60  case "sktr":
61  $obj = new ilSkillTemplateReference();
62  $obj->setId($obj_rec["obj_id"]);
63  $obj->setDataRecord($obj_rec);
64  $obj->read();
65  break;
66  }
67  return $obj;
68  }
global $DIC
Definition: goto.php:24
$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: