98 function ilObject($a_id = 0, $a_reference =
true)
102 $ilBench->start(
"Core",
"ilObject_Constructor");
106 echo
"<br/><font color=\"red\">type(".$this->type.
") id(".$a_id.
") referenced(".$a_reference.
")</font>";
112 $this->max_title = MAXLENGTH_OBJ_TITLE;
113 $this->max_desc = MAXLENGTH_OBJ_DESC;
114 $this->add_dots =
true;
116 $this->referenced = $a_reference;
117 $this->call_by_reference = $a_reference;
121 $this->referenced =
false;
124 if ($this->referenced)
126 $this->ref_id = $a_id;
138 $ilBench->stop(
"Core",
"ilObject_Constructor");
156 function read($a_force_db =
false)
160 $ilBench->start(
"Core",
"ilObject_read");
162 if (isset($this->obj_data_record) && !$a_force_db)
166 else if ($this->referenced)
169 if (!isset($this->ref_id))
171 $message =
"ilObject::read(): No ref_id given! (".$this->type.
")";
172 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
176 $ilBench->start(
"Core",
"ilObject_read_readData");
178 $q =
"SELECT * FROM object_data, object_reference WHERE object_data.obj_id=object_reference.obj_id ".
179 "AND object_reference.ref_id= ".$ilDB->quote($this->ref_id,
"integer");
180 $object_set = $ilDB->query($q);
181 $ilBench->stop(
"Core",
"ilObject_read_readData");
184 if ($ilDB->numRows($object_set) == 0)
186 $message =
"ilObject::read(): Object with ref_id ".$this->ref_id.
" not found! (".$this->type.
")";
187 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
190 $obj = $ilDB->fetchAssoc($object_set);
195 if (!isset($this->
id))
197 $message =
"ilObject::read(): No obj_id given! (".$this->type.
")";
198 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
202 $q =
"SELECT * FROM object_data ".
203 "WHERE obj_id = ".$ilDB->quote($this->
id,
"integer");
204 $object_set = $ilDB->query($q);
207 if ($ilDB->numRows($object_set) == 0)
209 $message =
"ilObject::read(): Object with obj_id: ".$this->id.
" (".$this->type.
") not found!";
210 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
213 $obj = $ilDB->fetchAssoc($object_set);
216 $this->
id = $obj[
"obj_id"];
219 if ($this->type != $obj[
"type"] && $obj[
"type"] !=
"xxx")
221 $message =
"ilObject::read(): Type mismatch. Object with obj_id: ".$this->id.
" ".
222 "was instantiated by type '".$this->type.
"'. DB type is: ".$obj[
"type"];
225 $log->write($message);
228 $this->ilias->raiseError(
"ilObject::read(): Type mismatch. (".$this->type.
"/".$this->id.
")",$this->ilias->error_obj->WARNING);
231 $this->type = $obj[
"type"];
232 $this->title = $obj[
"title"];
234 $this->untranslatedTitle = $obj[
"title"];
236 $this->desc = $obj[
"description"];
237 $this->owner = $obj[
"owner"];
238 $this->create_date = $obj[
"create_date"];
239 $this->last_update = $obj[
"last_update"];
240 $this->import_id = $obj[
"import_id"];
242 if($objDefinition->isRBACObject($this->getType()))
245 $query =
"SELECT * FROM object_description WHERE obj_id = ".$ilDB->quote($this->
id,
'integer');
249 if(strlen(
$row->description))
257 $ilBench->start(
"Core",
"ilObject_Constructor_getTranslation");
258 $translation_type = $objDefinition->getTranslationType($this->type);
260 if ($translation_type ==
"sys")
262 $this->title = $this->lng->txt(
"obj_".$this->type);
263 $this->desc = $this->lng->txt(
"obj_".$this->type.
"_desc");
265 elseif ($translation_type ==
"db")
267 $q =
"SELECT title,description FROM object_translation ".
268 "WHERE obj_id = ".$ilDB->quote($this->
id,
'integer').
" ".
269 "AND lang_code = ".$ilDB->quote($this->ilias->account->getCurrentLanguage(),
'text').
" ".
270 "AND NOT lang_default = 1";
271 $r = $this->ilias->db->query($q);
276 $this->title =
$row->title;
278 #$this->desc = $row->description;
282 $ilBench->stop(
"Core",
"ilObject_Constructor_getTranslation");
284 $ilBench->stop(
"Core",
"ilObject_read");
314 $this->ref_id = $a_id;
315 $this->referenced =
true;
345 $this->type = $a_type;
420 $this->long_desc = $a_desc;
433 return strlen($this->long_desc) ? $this->long_desc :
$this->desc;
455 $this->import_id = $a_import_id;
462 $query =
"SELECT * FROM object_data ".
463 "WHERE import_id = ".$ilDB->quote($a_import_id,
"text").
" ".
464 "ORDER BY create_date DESC";
466 while(
$row = $ilDB->fetchObject(
$res))
502 if ($a_owner_id != -1)
512 $own_name =
$owner->getFullname();
516 $own_name = $lng->txt(
"unknown");
530 $this->owner = $a_owner;
582 $this->obj_data_record = $a_record;
595 global
$ilDB,
$log,$ilUser,$objDefinition;
597 if (!isset($this->type))
599 $message = get_class($this).
"::create(): No object type given!";
600 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
604 $log->write(
"ilObject::create(), start");
614 elseif(is_object($ilUser))
616 $owner = $ilUser->getId();
622 $this->
id = $ilDB->nextId(
"object_data");
623 $q =
"INSERT INTO object_data ".
624 "(obj_id,type,title,description,owner,create_date,last_update,import_id) ".
627 $ilDB->quote($this->
id,
"integer").
",".
628 $ilDB->quote($this->type,
"text").
",".
629 $ilDB->quote($this->
getTitle(),
"text").
",".
631 $ilDB->quote(
$owner,
"integer").
",".
636 $ilDB->manipulate($q);
642 if($objDefinition->isRBACObject($this->getType()))
645 'obj_id' => array(
'integer',$this->
id),
648 $ilDB->insert(
'object_description',$values);
655 $q =
"SELECT last_update, create_date FROM object_data".
656 " WHERE obj_id = ".$ilDB->quote($this->
id,
"integer");
657 $obj_set = $ilDB->query($q);
658 $obj_rec = $ilDB->fetchAssoc($obj_set);
659 $this->last_update = $obj_rec[
"last_update"];
660 $this->create_date = $obj_rec[
"create_date"];
666 $log->write(
"ilObject::create(), finished, obj_id: ".$this->
id.
", type: ".
667 $this->type.
", title: ".$this->getTitle());
669 $GLOBALS[
'ilAppEventHandler']->raise(
672 array(
'obj_id' => $this->
id,
'obj_type' => $this->type));
685 global $objDefinition,
$ilDB;
687 $q =
"UPDATE object_data ".
689 "title = ".$ilDB->quote($this->
getTitle(),
"text").
",".
690 "description = ".$ilDB->quote($this->
getDescription(),
"text").
", ".
691 "import_id = ".$ilDB->quote($this->
getImportId(),
"text").
",".
692 "last_update = ".$ilDB->now().
" ".
693 "WHERE obj_id = ".$ilDB->quote($this->
getId(),
"integer");
694 $ilDB->manipulate($q);
699 $q =
"SELECT last_update FROM object_data".
700 " WHERE obj_id = ".$ilDB->quote($this->
getId(),
"integer");
701 $obj_set = $ilDB->query($q);
702 $obj_rec = $ilDB->fetchAssoc($obj_set);
703 $this->last_update = $obj_rec[
"last_update"];
705 if($objDefinition->isRBACObject($this->getType()))
708 $res = $this->ilias->db->query(
"SELECT * FROM object_description WHERE obj_id = ".
709 $ilDB->quote($this->getId(),
'integer'));
715 $ilDB->update(
'object_description',$values,array(
'obj_id' => array(
'integer',$this->
getId())));
721 'obj_id' => array(
'integer',$this->
getId()));
722 $ilDB->insert(
'object_description',$values);
725 $GLOBALS[
'ilAppEventHandler']->raise(
728 array(
'obj_id' => $this->
getId(),
729 'obj_type' => $this->
getType(),
748 include_once
'Services/MetaData/classes/class.ilMD.php';
750 $GLOBALS[
'ilAppEventHandler']->raise(
753 array(
'obj_id' => $this->
getId(),
754 'obj_type' => $this->
getType(),
763 if(!is_object($md_gen = $md->getGeneral()))
767 $this->
setTitle($md_gen->getTitle());
769 foreach($md_gen->getDescriptionIds() as
$id)
771 $md_des = $md_gen->getDescription(
$id);
789 include_once
'Services/MetaData/classes/class.ilMDCreator.php';
794 $md_creator->setTitle($this->
getTitle());
795 $md_creator->setTitleLanguage($ilUser->getPref(
'language'));
797 $md_creator->setDescriptionLanguage($ilUser->getPref(
'language'));
798 $md_creator->setKeywordLanguage($ilUser->getPref(
'language'));
799 $md_creator->setLanguage($ilUser->getPref(
'language'));
800 $md_creator->create();
810 include_once(
"Services/MetaData/classes/class.ilMD.php");
811 include_once(
"Services/MetaData/classes/class.ilMDGeneral.php");
812 include_once(
"Services/MetaData/classes/class.ilMDDescription.php");
815 $md_gen =& $md->getGeneral();
821 $md_gen =& $md->getGeneral();
824 $md_gen->setTitle($this->
getTitle());
827 $md_des_ids =& $md_gen->getDescriptionIds();
828 if (count($md_des_ids) > 0)
830 $md_des =& $md_gen->getDescription($md_des_ids[0]);
844 include_once(
'Services/MetaData/classes/class.ilMD.php');
859 $q =
"UPDATE object_data ".
861 "owner = ".$ilDB->quote($this->
getOwner(),
"integer").
", ".
862 "last_update = ".$ilDB->now().
" ".
863 "WHERE obj_id = ".$ilDB->quote($this->
getId(),
"integer");
864 $ilDB->manipulate($q);
866 $q =
"SELECT last_update FROM object_data".
867 " WHERE obj_id = ".$ilDB->quote($this->
getId(),
"integer");
868 $obj_set = $ilDB->query($q);
869 $obj_rec = $ilDB->fetchAssoc($obj_set);
870 $this->last_update = $obj_rec[
"last_update"];
886 $ilDB->setLimit(1,0);
887 $q =
"SELECT * FROM object_data WHERE import_id = ".$ilDB->quote($a_import_id,
"text").
888 " ORDER BY create_date DESC";
889 $obj_set = $ilDB->query($q);
891 if ($obj_rec = $ilDB->fetchAssoc($obj_set))
893 return $obj_rec[
"obj_id"];
910 $query =
"SELECT * FROM object_reference WHERE obj_id = ".
911 $ilDB->quote($a_id,
'integer');
915 while($obj_rec = $ilDB->fetchAssoc(
$res))
917 $ref[$obj_rec[
"ref_id"]] = $obj_rec[
"ref_id"];
930 global $ilObjDataCache;
932 $tit = $ilObjDataCache->lookupTitle($a_id);
944 global $ilObjDataCache;
946 $owner = $ilObjDataCache->lookupOwner($a_id);
955 ?
"SELECT obj_id FROM object_data WHERE title = ".$ilDB->quote(
$title,
"text")
956 :
"SELECT obj_id FROM object_data WHERE ".$ilDB->like(
"title",
"text",
'%'.
$title.
'%');
959 $query .=
" AND type = ".$ilDB->quote(
$type,
"text");
962 $result = $ilDB->query(
$query);
964 $object_ids = array();
965 while(
$row = $ilDB->fetchAssoc($result))
967 $object_ids[] =
$row[
'obj_id'];
970 return is_array($object_ids) ? $object_ids : array();
980 global $ilObjDataCache;
982 return $ilObjDataCache->lookupDescription($a_id);
992 global $ilObjDataCache;
1000 return $ilObjDataCache->lookupLastUpdate($a_id);
1013 if (!is_array($a_objs))
1015 $a_objs = array($a_objs);
1018 $set = $ilDB->query(
"SELECT max(last_update) as last_update FROM object_data ".
1019 "WHERE ".$ilDB->in(
"obj_id", $a_objs,
false,
"integer").
" ");
1020 $rec = $ilDB->fetchAssoc($set);
1022 return ($rec[
"last_update"]);
1027 global $ilObjDataCache;
1029 return (
int) $ilObjDataCache->lookupObjId($a_id);
1039 $query =
"UPDATE object_reference SET deleted= ".$ilDB->now().
' '.
1040 "WHERE ref_id = ".$ilDB->quote($a_ref_id,
'integer');
1051 $query =
"UPDATE object_reference SET deleted = ".$ilDB->quote(null,
'timestamp').
1052 " WHERE ref_id = ".$ilDB->quote($a_ref_id,
'integer');
1063 $query =
"SELECT deleted FROM object_reference".
1064 " WHERE ref_id = ".$ilDB->quote($a_ref_id,
"integer");
1065 $set = $ilDB->query(
$query);
1066 $rec = $ilDB->fetchAssoc($set);
1068 return $rec[
"deleted"];
1083 $q =
"UPDATE object_data ".
1085 "title = ".$ilDB->quote($a_title,
"text").
",".
1086 "last_update = ".$ilDB->now().
" ".
1087 "WHERE obj_id = ".$ilDB->quote($a_obj_id,
"integer");
1089 $ilDB->manipulate($q);
1101 global
$ilDB,$objDefinition;
1106 $q =
"UPDATE object_data ".
1108 "description = ".$ilDB->quote(
$desc,
"text").
",".
1109 "last_update = ".$ilDB->now().
" ".
1110 "WHERE obj_id = ".$ilDB->quote($a_obj_id,
"integer");
1112 $ilDB->manipulate($q);
1114 if($objDefinition->isRBACObject($this->getType()))
1117 $res = $ilDB->query(
"SELECT * FROM object_description WHERE obj_id = ".
1118 $ilDB->quote($a_obj_id,
'integer'));
1125 $ilDB->update(
'object_description',$values,array(
'obj_id' => array(
'integer',$this->
getId())));
1131 'obj_id' => array(
'integer',$this->
getId()));
1132 $ilDB->insert(
'object_description',$values);
1148 $q =
"UPDATE object_data ".
1150 "import_id = ".$ilDB->quote($a_import_id,
"text").
",".
1151 "last_update = ".$ilDB->now().
" ".
1152 "WHERE obj_id = ".$ilDB->quote($a_obj_id,
"integer");
1154 $ilDB->manipulate($q);
1164 global $ilObjDataCache;
1168 return $ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($a_id));
1170 return $ilObjDataCache->lookupType($a_id);
1174 if ($a_reference ===
true)
1176 $q =
"SELECT type FROM object_reference obr, object_data obd ".
1177 "WHERE obr.ref_id = ".$ilDB->quote($a_id,
"integer").
" ".
1178 "AND obr.obj_id = obd.obj_id ";
1182 $q =
"SELECT type FROM object_data WHERE obj_id = ".$ilDB->quote($a_id,
"integer");
1185 $obj_set = $ilDB->query($q);
1186 $obj_rec = $ilDB->fetchAssoc($obj_set);
1188 return $obj_rec[
"type"];
1198 return $tree->isSaved($a_ref_id);
1225 global $ilObjDataCache;
1227 return (
int) $ilObjDataCache->lookupObjId($a_ref_id);
1244 $q =
"SELECT * FROM object_data WHERE type = ".$ilDB->quote($a_type,
"text");
1245 $obj_set = $ilDB->query($q);
1248 while ($obj_rec = $ilDB->fetchAssoc($obj_set))
1252 $objects[$obj_rec[
"title"].
".".$obj_rec[
"obj_id"]] = array(
"id" => $obj_rec[
"obj_id"],
1253 "type" => $obj_rec[
"type"],
"title" => $obj_rec[
"title"],
1254 "description" => $obj_rec[
"description"]);
1270 $tree->insertNode($this->
getRefId(), $a_parent_ref);
1273 $log->write(
"ilObject::putInTree(), parent_ref: $a_parent_ref, ref_id: ".
1287 global $rbacadmin, $rbacreview;
1289 $parentRoles = $rbacreview->getParentRoleIds($a_parent_ref);
1291 foreach ($parentRoles as $parRol)
1293 $ops = $rbacreview->getOperationsOfRole($parRol[
"obj_id"], $this->
getType(), $parRol[
"parent"]);
1294 $rbacadmin->grantPermission($parRol[
"obj_id"], $ops, $this->
getRefId());
1310 if (!isset($this->
id))
1312 $message =
"ilObject::createNewReference(): No obj_id given!";
1313 $this->raiseError($message,$this->ilias->error_obj->WARNING);
1316 $next_id = $ilDB->nextId(
'object_reference');
1317 $query =
"INSERT INTO object_reference ".
1318 "(ref_id, obj_id) VALUES (".$ilDB->quote($next_id,
'integer').
','.$ilDB->quote($this->
id ,
'integer').
")";
1319 $this->ilias->db->query(
$query);
1321 $this->ref_id = $next_id;
1322 $this->referenced =
true;
1338 if (!isset($this->
id))
1340 $message =
"ilObject::countReferences(): No obj_id given!";
1341 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
1344 $query =
"SELECT COUNT(ref_id) num FROM object_reference ".
1345 "WHERE obj_id = ".$ilDB->quote($this->
id,
'integer').
" ";
1375 if ($this->type != $db_type)
1377 $message =
"ilObject::delete(): Type mismatch. Object with obj_id: ".$this->id.
" ".
1378 "was instantiated by type '".$this->type.
"'. DB type is: ".$db_type;
1381 $log->write($message);
1384 $this->ilias->raiseError(
"ilObject::delete(): Type mismatch. (".$this->type.
"/".$this->id.
")",$this->ilias->error_obj->WARNING);
1388 $q =
"DELETE FROM object_data ".
1389 "WHERE obj_id = ".$ilDB->quote($this->
getId(),
"integer");
1390 $ilDB->manipulate($q);
1393 $query =
"DELETE FROM object_description WHERE obj_id = ".
1394 $ilDB->quote($this->
getId(),
"integer");
1395 $ilDB->manipulate(
$query);
1398 $log->write(
"ilObject::delete(), deleted object, obj_id: ".$this->
getId().
", type: ".
1402 include_once(
"./Services/News/classes/class.ilNewsItem.php");
1404 $news_item->deleteNewsOfContext($this->
getId(), $this->
getType());
1405 include_once(
"./Services/Block/classes/class.ilBlockSetting.php");
1413 $log->write(
"ilObject::delete(), object not deleted, number of references: ".
1419 if ($this->referenced)
1422 $query =
"DELETE FROM object_reference ".
1423 "WHERE ref_id = ".$ilDB->quote($this->
getRefId(),
'integer');
1427 $log->write(
"ilObject::delete(), reference deleted, ref_id: ".$this->
getRefId().
1428 ", obj_id: ".$this->
getId().
", type: ".
1435 $rbacadmin->revokePermission($this->
getRefId(),0,
false);
1437 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
1445 if ($this->referenced)
1453 $query =
"DELETE FROM dav_property ".
1454 "WHERE obj_id = ".$ilDB->quote($this->
getId(),
'integer');
1458 include_once
'./Services/Tracking/classes/class.ilChangeEvent.php';
1492 if ($rolf_data = $rbacreview->getRoleFolderofObject($this->getRefId()))
1494 $rfoldObj = $this->ilias->obj_factory->getInstanceByRefId($rolf_data[
"ref_id"]);
1498 include_once (
"./Services/AccessControl/classes/class.ilObjRoleFolder.php");
1500 $rfoldObj->setTitle($this->
getId());
1501 $rfoldObj->setDescription(
" (ref_id ".$this->
getRefId().
")");
1502 $rfoldObj->create();
1503 $rfoldObj->createReference();
1504 $rfoldObj->putInTree($this->
getRefId());
1505 $rfoldObj->setPermissions($this->
getRefId());
1525 $q =
"SELECT * FROM object_data ".
1526 "LEFT JOIN object_reference ON object_reference.obj_id=object_data.obj_id ".
1527 "WHERE object_reference.ref_id= ".$ilDB->quote($a_id,
"integer");
1531 $q =
"SELECT * FROM object_data WHERE obj_id=".$ilDB->quote($a_id,
"integer");
1534 $r = $ilDB->query($q);
1536 return $ilDB->numRows($r) ?
true :
false;
1551 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
1555 $parent_id = (int) $tree->getParentId($a_node_id);
1557 if ($parent_id != 0)
1559 $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
1560 $obj_data->notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$parent_id,$a_params);
1569 $this->
register = (bool) $a_bool;
1601 $order =
" ORDER BY title";
1606 $where_clause =
"WHERE type = ".
1607 $ilDB->quote($a_obj_type,
"text");
1611 $where_clause.=
" AND owner = ".$ilDB->quote($a_owner,
"integer");
1615 $q =
"SELECT * FROM object_data ".$where_clause.$order;
1616 $r = $ilDB->query($q);
1619 if ($ilDB->numRows($r) > 0)
1621 while (
$row = $ilDB->fetchAssoc($r))
1623 $row[
"desc"] =
$row[
"description"];
1643 $query =
"SELECT obj_data.title obj_title,path_data.title path_title,child FROM tree ".
1644 "JOIN object_reference obj_ref ON child = obj_ref.ref_id ".
1645 "JOIN object_data obj_data ON obj_ref.obj_id = obj_data.obj_id ".
1646 "JOIN object_reference path_ref ON parent = path_ref.ref_id ".
1647 "JOIN object_data path_data ON path_ref.obj_id = path_data.obj_id ".
1648 "WHERE ".$ilDB->in(
"child", $a_ref_ids,
false,
"integer").
" ".
1649 "ORDER BY obj_data.title ";
1652 if (!$objDefinition->isPlugin($new_type))
1654 $options[0] = $lng->txt(
'obj_'.$new_type.
'_select');
1658 include_once(
"./Services/Component/classes/class.ilPlugin.php");
1662 while(
$row = $ilDB->fetchObject(
$res))
1668 if(strlen(
$path =
$row->path_title) > 40)
1674 $options[
$row->child] = (
$title.
' ('.$lng->txt(
'path').
': '.
$path.
')');
1676 return $options ? $options : array();
1690 global $objDefinition,$ilUser,$rbacadmin,
$ilDB;
1693 $class_name = (
'ilObj'.$objDefinition->getClassName($this->
getType()));
1698 include_once(
$location.
"/class.".$class_name.
".php");
1699 $new_obj =
new $class_name(0,
false);
1700 $new_obj->setOwner($ilUser->getId());
1701 $new_obj->setTitle(
$title);
1703 $new_obj->setType($this->
getType());
1705 $new_obj->create(
true);
1706 $new_obj->createReference();
1707 $new_obj->putInTree($a_target_id);
1708 $new_obj->setPermissions($a_target_id);
1711 $rbacadmin->copyLocalRoles($this->
getRefId(),$new_obj->getRefId());
1713 include_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
1717 $query =
"INSERT INTO dav_property (obj_id,node_id,ns,name,value) ".
1718 "SELECT ".$ilDB->quote($new_obj->getId(),
'integer').
",node_id,ns,name,value ".
1719 "FROM dav_property ".
1720 "WHERE obj_id = ".$ilDB->quote($this->getId(),
'integer');
1721 $res = $ilDB->manipulate($query);
1738 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
1740 if(!$cp_options->isRootNode($this->getRefId()))
1744 $nodes = $tree->getChilds($a_target_id);
1746 $title_unique =
false;
1747 require_once
'Modules/File/classes/class.ilObjFileAccess.php';
1750 while(!$title_unique)
1753 foreach($nodes as $node)
1755 if((
$title == $node[
'title']) and ($this->
getType() == $node[
'type']))
1803 include_once
"./Services/MetaData/classes/class.ilMD.php";
1805 $md->cloneMD($target_obj->getId(),0,$target_obj->getType());
1817 public static function _getIcon($a_obj_id =
"", $a_size =
"big", $a_type =
"",
1822 if ($a_obj_id ==
"" && $a_type ==
"")
1837 if ($ilSetting->get(
"custom_icons") &&
1838 in_array($a_type, array(
"cat",
"grp",
"crs",
"root")))
1840 require_once(
"./Services/Container/classes/class.ilContainer.php");
1844 $file_name = $cont_dir.
"/icon_".$a_size.
".gif";
1855 case "small": $suff =
"";
break;
1856 case "tiny": $suff =
"_s";
break;
1857 default: $suff =
"_b";
break;
1861 if ($objDefinition->isRBACObject($a_type))
1863 if (!$objDefinition->isPlugin($a_type))
1869 include_once(
"./Services/Repository/classes/class.ilRepositoryObjectPlugin.php");
1877 return "./images/icon_".$a_type.$suff.
".gif";
1889 global $objDefinition, $tree;
1893 $deps[
"dep"] = array();
1896 $deps[
"del_ids"][$a_obj_id] = $a_obj_id;
1898 if (!$objDefinition->isPlugin(
$type))
1900 $class_name =
"ilObj".$objDefinition->getClassName($a_type);
1901 $location = $objDefinition->getLocation($a_type);
1902 include_once(
$location.
"/class.".$class_name.
".php");
1903 $odeps = call_user_func(array($class_name,
"getDeletionDependencies"), $a_obj_id);
1904 if (is_array($odeps))
1906 foreach ($odeps as
$id => $message)
1908 $deps[
"dep"][
$id][$a_obj_id][] = $message;
1913 foreach ($tree->getChilds($a_ref_id) as $c)
1922 foreach ($deps[
"del_ids"] as $obj_id)
1924 unset($deps[
"dep"][$obj_id]);
1926 $deps = $deps[
"dep"];