ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
class.ilLMObjectFactory.php
Go to the documentation of this file.
1
<?php
2
25
class
ilLMObjectFactory
26
{
27
public
static
function
getInstance
(
28
ilObjLearningModule
$a_content_obj,
29
int
$a_id = 0,
30
bool
$a_halt =
true
31
): ?
ilLMObject
{
32
global
$DIC
;
33
34
$ilDB
= $DIC->database();
35
36
$query =
"SELECT * FROM lm_data WHERE obj_id = "
.
37
$ilDB
->quote($a_id,
"integer"
);
38
$obj_set =
$ilDB
->query($query);
39
$obj_rec =
$ilDB
->fetchAssoc($obj_set);
40
41
$obj =
null
;
42
if
($obj_rec) {
43
switch
($obj_rec[
"type"
]) {
44
case
"st"
:
45
$obj =
new
ilStructureObject
($a_content_obj);
46
$obj->setId($obj_rec[
"obj_id"
]);
47
$obj->setDataRecord($obj_rec);
48
$obj->read();
49
break
;
50
51
case
"pg"
:
52
$obj =
new
ilLMPageObject
($a_content_obj, 0, $a_halt);
53
$obj->setId($obj_rec[
"obj_id"
]);
54
$obj->setDataRecord($obj_rec);
55
$obj->read();
56
break
;
57
}
58
}
59
return
$obj;
60
}
61
}
ilObjLearningModule
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilObjLearningModule.php:22
ilLMObjectFactory
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilLMObjectFactory.php:25
ilLMObjectFactory\getInstance
static getInstance(ilObjLearningModule $a_content_obj, int $a_id=0, bool $a_halt=true)
Definition:
class.ilLMObjectFactory.php:27
null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Definition:
shib_logout.php:144
$ilDB
$ilDB
Definition:
storeScorm2004.php:25
ilLMPageObject
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilLMPageObject.php:33
$DIC
global $DIC
Definition:
shib_login.php:26
ilLMObject
ilStructureObject
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilStructureObject.php:27
components
ILIAS
LearningModule
classes
class.ilLMObjectFactory.php
Generated on Sun Aug 31 2025 23:03:11 for ILIAS by
1.8.13 (using
Doxyfile
)