ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLMObjectFactory Class Reference

Class ilLMObjectFactory. More...

+ Collaboration diagram for ilLMObjectFactory:

Public Member Functions

 getInstance (&$a_content_obj, $a_id=0, $a_halt=true)

Detailed Description

Class ilLMObjectFactory.

Creates StructureObject or PageObject by ID (see table lm_data)

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilLMObjectFactory.php 19193 2009-02-28 01:53:40Z akill

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

Member Function Documentation

ilLMObjectFactory::getInstance ( $a_content_obj,
  $a_id = 0,
  $a_halt = true 
)

Definition at line 39 of file class.ilLMObjectFactory.php.

References $ilDB, and $query.

Referenced by ilLMObject\_deleteAllObjectData(), ilObjContentObjectGUI\confirmedDelete(), ilStructureObjectGUI\cutPage(), ilStructureObject\delete_rec(), ilObjContentObjectGUI\executeCommand(), ilObjContentObject\executeDragDrop(), ilLMPresentationGUI\ilLocator(), ilObjContentObjectGUI\pasteChapter(), ilLMObject\saveTitles(), and ilWysiwygUtil\showMoveCopyQuestion().

{
global $ilias, $ilDB;
$query = "SELECT * FROM lm_data WHERE obj_id = ".
$ilDB->quote($a_id, "integer");
$obj_set = $ilDB->query($query);
$obj_rec = $ilDB->fetchAssoc($obj_set);
switch($obj_rec["type"])
{
case "st":
$obj =& new ilStructureObject($a_content_obj);
$obj->setId($obj_rec["obj_id"]);
$obj->setDataRecord($obj_rec);
$obj->read();
break;
case "pg":
$obj =& new ilLMPageObject($a_content_obj, 0, $a_halt);
$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: