Public Member Functions | |
| & | _getInstance ($a_parent_id, $a_id, $a_type) |
| & | _getInstanceByRefId ($a_parent_id, $a_id, $a_type) |
Definition at line 36 of file class.ilLPItemListFactory.php.
| & ilLPItemListFactory::_getInstance | ( | $ | a_parent_id, | |
| $ | a_id, | |||
| $ | a_type | |||
| ) |
Definition at line 38 of file class.ilLPItemListFactory.php.
Referenced by ilPDFPresentation::__createObjectDetails(), ilPDFPresentation::__createObjectList(), ilPDFPresentation::__createPersonalProgressList(), ilLPListOfObjectsGUI::__listObjects(), ilLPListOfProgressGUI::__showProgressList(), and _getInstanceByRefId().
{
static $obj_cache = array();
if(is_object($obj_cache[$a_type.'_'.$a_id]))
{
$object =& $obj_cache[$a_type.'_'.$a_id];
if($a_type == 'sahs_item' or
$a_type == 'objective')
{
$object->setChildId($a_id);
}
return $obj_cache[$a_type.'_'.$a_id];
}
switch($a_type)
{
case 'crs':
include_once 'Services/Tracking/classes/ItemList/class.ilLPCourseListGUI.php';
$object = new ilLPCourseListGUI($a_id);
$object->read();
return $obj_cache[$a_type.'_'.$a_id] =& $object;
case 'tst':
include_once 'Services/Tracking/classes/ItemList/class.ilLPTestListGUI.php';
$object = new ilLPTestListGUI($a_id);
$object->read();
return $obj_cache[$a_type.'_'.$a_id] =& $object;
case 'lm':
include_once 'Services/Tracking/classes/ItemList/class.ilLPContentObjectListGUI.php';
$object = new ilLPContentObjectListGUI($a_id);
$object->read();
return $obj_cache[$a_type.'_'.$a_id] =& $object;
case 'sahs':
include_once 'Services/Tracking/classes/ItemList/class.ilLPSAHSListGUI.php';
$object = new ilLPSAHSListGUI($a_id);
$object->read();
return $obj_cache[$a_type.'_'.$a_id] =& $object;
case 'htlm':
include_once 'Services/Tracking/classes/ItemList/class.ilLPFileBasedLMListGUI.php';
$object = new ilLPFileBasedLMListGUI($a_id);
$object->read();
return $obj_cache[$a_type.'_'.$a_id] =& $object;
case 'grp':
include_once 'Services/Tracking/classes/ItemList/class.ilLPGroupListGUI.php';
$object = new ilLPGroupListGUI($a_id);
$object->read();
return $obj_cache[$a_type.'_'.$a_id] =& $object;
case 'fold':
include_once 'Services/Tracking/classes/ItemList/class.ilLPFolderListGUI.php';
$object = new ilLPFolderListGUI($a_id);
$object->read();
return $obj_cache[$a_type.'_'.$a_id] =& $object;
case 'exc':
include_once 'Services/Tracking/classes/ItemList/class.ilLPExerciseListGUI.php';
$object = new ilLPExerciseListGUI($a_id);
$object->read();
return $obj_cache[$a_type.'_'.$a_id] =& $object;
case 'event':
include_once 'Services/Tracking/classes/ItemList/class.ilLPEventListGUI.php';
$object = new ilLPEventListGUI($a_id);
$object->read();
return $obj_cache[$a_type.'_'.$a_id] =& $object;
case 'objective':
include_once 'Services/Tracking/classes/ItemList/class.ilLPObjectiveItemListGUI.php';
$object = new ilLPObjectiveItemListGUI($a_parent_id);
$object->setChildId($a_id);
$object->read();
$obj_cache[$a_type.'_'.$a_id] =& $object;
return $obj_cache[$a_type.'_'.$a_id];
case 'sahs_item':
include_once 'Services/Tracking/classes/ItemList/class.ilLPSAHSItemListGUI.php';
$object = new ilLPSAHSItemListGUI($a_parent_id);
$object->setChildId($a_id);
$object->read();
$obj_cache[$a_type.'_'.$a_id] =& $object;
return $obj_cache[$a_type.'_'.$a_id];
case 'usr':
include_once 'Services/Tracking/classes/ItemList/class.ilLPUserItemListGUI.php';
$object = new ilLPUserItemListGUI($a_id);
$object->read();
$obj_cache[$a_type.'_'.$a_id] =& $object;
return $obj_cache[$a_type.'_'.$a_id];
default:
die('ilLPItemListFactory:: Unknown type'.$a_type);
}
}
Here is the caller graph for this function:| & ilLPItemListFactory::_getInstanceByRefId | ( | $ | a_parent_id, | |
| $ | a_id, | |||
| $ | a_type | |||
| ) |
Definition at line 150 of file class.ilLPItemListFactory.php.
References _getInstance().
Referenced by ilPDFPresentation::__renderContainerRow(), ilLPListOfProgressGUI::__renderContainerRow(), ilLPListOfObjectsGUI::__renderContainerRow(), ilLPListOfObjectsGUI::details(), and ilLPListOfObjectsGUI::editUser().
{
global $ilObjDataCache;
switch($a_type)
{
case 'sahs_item':
case 'objective':
return ilLPItemListFactory::_getInstance($ilObjDataCache->lookupObjId($a_parent_id),$a_id,$a_type);
case 'event':
return ilLPItemListFactory::_getInstance($a_parent_id,$a_id,$a_type);
default:
$object =& ilLPItemListFactory::_getInstance($a_parent_id,$ilObjDataCache->lookupObjId($a_id),$a_type);
$object->setRefId($a_id);
return $object;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:
1.7.1