ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups 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
Version
$Id$

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

Member Function Documentation

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

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

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

{
global $ilias, $ilDB;
$query = "SELECT * FROM skl_tree_node WHERE obj_id = ".
$ilDB->quote($a_id, "integer");
$obj_set = $ilDB->query($query);
$obj_rec = $ilDB->fetchAssoc($obj_set);
$obj = null;
switch($obj_rec["type"])
{
case "skll":
$obj = new ilBasicSkill();
$obj->setId($obj_rec["obj_id"]);
$obj->setDataRecord($obj_rec);
$obj->read();
break;
case "scat":
$obj = new ilSkillCategory();
$obj->setId($obj_rec["obj_id"]);
$obj->setDataRecord($obj_rec);
$obj->read();
break;
case "sktp":
$obj = new ilBasicSkillTemplate();
$obj->setId($obj_rec["obj_id"]);
$obj->setDataRecord($obj_rec);
$obj->read();
break;
case "sctp":
$obj->setId($obj_rec["obj_id"]);
$obj->setDataRecord($obj_rec);
$obj->read();
break;
case "skrt":
$obj = new ilSkillRoot();
$obj->setId($obj_rec["obj_id"]);
$obj->setDataRecord($obj_rec);
$obj->read();
break;
case "sktr":
$obj->setId($obj_rec["obj_id"]);
$obj->setDataRecord($obj_rec);
$obj->read();
break;
}
return $obj;
}

+ Here is the caller graph for this function:


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