ILIAS  Release_3_10_x_branch Revision 61812
 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 15697 2008-01-08 20:04:33Z hschottm

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 DB_FETCHMODE_ASSOC.

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);
$obj_set = $ilias->db->query($query);
$obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC);
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: