3declare(strict_types=1);
65 "SELECT object_data.type" . PHP_EOL
66 .
"FROM object_data,object_reference" . PHP_EOL
67 .
"WHERE object_reference.obj_id = object_data.obj_id" . PHP_EOL
68 .
"AND object_reference.ref_id = %s" . PHP_EOL
71 $result = $this->db->queryF($sql, [
"integer"], [
$ref_id]);
72 if (!($row = $this->db->fetchAssoc($result))) {
74 "ilObjectGUIFactory::getInstanceByRefId(): Object with ref_id " .
$ref_id .
" not found!"
79 $class_name =
"ilObj" . $this->obj_definition->getClassName($row[
"type"]) .
"GUI";
80 if ($class_name ==
"ilObjGUI") {
81 throw new ilObjectException(
"ilObjectGUIFactory::getInstanceByRefId(): Not able to determine object " .
82 "class for type" . $row[
"type"] .
".");
86 $location = $this->obj_definition->getLocation($row[
"type"]);
87 include_once(
$location .
"/class." . $class_name .
".php");
88 return new $class_name(
"",
$ref_id,
true,
false);
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
parses the objects.xml it handles the xml-description of all ilias objects
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilObjectDefinition $obj_definition
__construct(ilObjectDefinition $obj_definition=null, ilDBInterface $db=null)
getInstanceByRefId(int $ref_id)
Get ilObj...GUI instance by reference id.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...