92 function ilObject($a_id = 0, $a_reference =
true)
96 $ilBench->start(
"Core",
"ilObject_Constructor");
100 echo
"<br/><font color=\"red\">type(".$this->type.
") id(".$a_id.
") referenced(".$a_reference.
")</font>";
106 $this->max_title = MAXLENGTH_OBJ_TITLE;
107 $this->max_desc = MAXLENGTH_OBJ_DESC;
108 $this->add_dots =
true;
110 $this->referenced = $a_reference;
111 $this->call_by_reference = $a_reference;
115 $this->referenced =
false;
118 if ($this->referenced)
120 $this->ref_id = $a_id;
132 $ilBench->stop(
"Core",
"ilObject_Constructor");
150 function read($a_force_db =
false)
154 $ilBench->start(
"Core",
"ilObject_read");
156 if (isset($this->obj_data_record) && !$a_force_db)
160 else if ($this->referenced)
163 if (!isset($this->ref_id))
165 $message =
"ilObject::read(): No ref_id given! (".$this->type.
")";
166 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
170 $ilBench->start(
"Core",
"ilObject_read_readData");
172 $q =
"SELECT * FROM object_data, object_reference WHERE object_data.obj_id=object_reference.obj_id ".
173 "AND object_reference.ref_id= ".$ilDB->quote($this->ref_id,
"integer");
174 $object_set = $ilDB->query(
$q);
175 $ilBench->stop(
"Core",
"ilObject_read_readData");
178 if ($ilDB->numRows($object_set) == 0)
180 $message =
"ilObject::read(): Object with ref_id ".$this->ref_id.
" not found! (".$this->type.
")";
181 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
184 $obj = $ilDB->fetchAssoc($object_set);
189 if (!isset($this->
id))
191 $message =
"ilObject::read(): No obj_id given! (".$this->type.
")";
192 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
196 $q =
"SELECT * FROM object_data ".
197 "WHERE obj_id = ".$ilDB->quote($this->
id,
"integer");
198 $object_set = $ilDB->query(
$q);
201 if ($ilDB->numRows($object_set) == 0)
203 $message =
"ilObject::read(): Object with obj_id: ".$this->id.
" (".$this->type.
") not found!";
204 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
207 $obj = $ilDB->fetchAssoc($object_set);
210 $this->
id = $obj[
"obj_id"];
213 if ($this->type != $obj[
"type"] && $obj[
"type"] !=
"xxx")
215 $message =
"ilObject::read(): Type mismatch. Object with obj_id: ".$this->id.
" ".
216 "was instantiated by type '".$this->type.
"'. DB type is: ".$obj[
"type"];
219 $log->write($message);
222 $this->ilias->raiseError(
"ilObject::read(): Type mismatch. (".$this->type.
"/".$this->id.
")",$this->ilias->error_obj->WARNING);
225 $this->type = $obj[
"type"];
226 $this->title = $obj[
"title"];
228 $this->untranslatedTitle = $obj[
"title"];
230 $this->desc = $obj[
"description"];
231 $this->owner = $obj[
"owner"];
232 $this->create_date = $obj[
"create_date"];
233 $this->last_update = $obj[
"last_update"];
234 $this->import_id = $obj[
"import_id"];
236 if($objDefinition->isRBACObject($this->getType()))
239 $query =
"SELECT * FROM object_description WHERE obj_id = ".$ilDB->quote($this->
id,
'integer');
243 if(strlen(
$row->description))
251 $ilBench->start(
"Core",
"ilObject_Constructor_getTranslation");
252 $translation_type = $objDefinition->getTranslationType($this->type);
254 if ($translation_type ==
"sys")
256 $this->title = $this->lng->txt(
"obj_".$this->type);
257 $this->desc = $this->lng->txt(
"obj_".$this->type.
"_desc");
259 elseif ($translation_type ==
"db")
261 $q =
"SELECT title,description FROM object_translation ".
262 "WHERE obj_id = ".$ilDB->quote($this->
id,
'integer').
" ".
263 "AND lang_code = ".$ilDB->quote($this->ilias->account->getCurrentLanguage(),
'text').
" ".
264 "AND NOT lang_default = 1";
265 $r = $this->ilias->db->query(
$q);
270 $this->title =
$row->title;
272 #$this->desc = $row->description;
276 $ilBench->stop(
"Core",
"ilObject_Constructor_getTranslation");
278 $ilBench->stop(
"Core",
"ilObject_read");
308 $this->ref_id = $a_id;
309 $this->referenced =
true;
339 $this->type = $a_type;
414 $this->long_desc = $a_desc;
427 return strlen($this->long_desc) ? $this->long_desc :
$this->desc;
449 $this->import_id = $a_import_id;
456 $query =
"SELECT * FROM object_data ".
457 "WHERE import_id = ".$ilDB->quote($a_import_id,
"text").
" ".
458 "ORDER BY create_date DESC";
460 while(
$row = $ilDB->fetchObject(
$res))
496 if ($a_owner_id != -1)
506 $own_name =
$owner->getFullname();
510 $own_name = $lng->txt(
"unknown");
524 $this->owner = $a_owner;
576 $this->obj_data_record = $a_record;
589 global
$ilDB,
$log,$ilUser,$objDefinition;
591 if (!isset($this->type))
593 $message = get_class($this).
"::create(): No object type given!";
594 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
598 $log->write(
"ilObject::create(), start");
608 elseif(is_object($ilUser))
610 $owner = $ilUser->getId();
616 $this->
id = $ilDB->nextId(
"object_data");
617 $q =
"INSERT INTO object_data ".
618 "(obj_id,type,title,description,owner,create_date,last_update,import_id) ".
621 $ilDB->quote($this->
id,
"integer").
",".
622 $ilDB->quote($this->type,
"text").
",".
623 $ilDB->quote($this->
getTitle(),
"text").
",".
625 $ilDB->quote(
$owner,
"integer").
",".
630 $ilDB->manipulate(
$q);
637 if($objDefinition->isRBACObject($this->getType()))
640 'obj_id' => array(
'integer',$this->
id),
643 $ilDB->insert(
'object_description',$values);
650 $q =
"SELECT last_update, create_date FROM object_data".
651 " WHERE obj_id = ".$ilDB->quote($this->
id,
"integer");
652 $obj_set = $ilDB->query(
$q);
653 $obj_rec = $ilDB->fetchAssoc($obj_set);
654 $this->last_update = $obj_rec[
"last_update"];
655 $this->create_date = $obj_rec[
"create_date"];
661 $log->write(
"ilObject::create(), finished, obj_id: ".$this->
id.
", type: ".
662 $this->type.
", title: ".$this->getTitle());
664 $GLOBALS[
'ilAppEventHandler']->raise(
667 array(
'obj_id' => $this->
id,
'obj_type' => $this->type));
680 global $objDefinition,
$ilDB;
682 $q =
"UPDATE object_data ".
684 "title = ".$ilDB->quote($this->
getTitle(),
"text").
",".
685 "description = ".$ilDB->quote($this->
getDescription(),
"text").
", ".
686 "import_id = ".$ilDB->quote($this->
getImportId(),
"text").
",".
687 "last_update = ".$ilDB->now().
" ".
688 "WHERE obj_id = ".$ilDB->quote($this->
getId(),
"integer");
689 $ilDB->manipulate(
$q);
694 $q =
"SELECT last_update FROM object_data".
695 " WHERE obj_id = ".$ilDB->quote($this->
getId(),
"integer");
696 $obj_set = $ilDB->query(
$q);
697 $obj_rec = $ilDB->fetchAssoc($obj_set);
698 $this->last_update = $obj_rec[
"last_update"];
700 if($objDefinition->isRBACObject($this->getType()))
703 $res = $this->ilias->db->query(
"SELECT * FROM object_description WHERE obj_id = ".
704 $ilDB->quote($this->getId(),
'integer'));
710 $ilDB->update(
'object_description',$values,array(
'obj_id' => array(
'integer',$this->
getId())));
716 'obj_id' => array(
'integer',$this->
getId()));
717 $ilDB->insert(
'object_description',$values);
720 $GLOBALS[
'ilAppEventHandler']->raise(
723 array(
'obj_id' => $this->
getId(),
724 'obj_type' => $this->
getType(),
743 include_once
'Services/MetaData/classes/class.ilMD.php';
745 $GLOBALS[
'ilAppEventHandler']->raise(
748 array(
'obj_id' => $this->
getId(),
749 'obj_type' => $this->
getType(),
758 if(!is_object($md_gen = $md->getGeneral()))
762 $this->
setTitle($md_gen->getTitle());
764 foreach($md_gen->getDescriptionIds() as
$id)
766 $md_des = $md_gen->getDescription(
$id);
784 include_once
'Services/MetaData/classes/class.ilMDCreator.php';
789 $md_creator->setTitle($this->
getTitle());
790 $md_creator->setTitleLanguage($ilUser->getPref(
'language'));
792 $md_creator->setDescriptionLanguage($ilUser->getPref(
'language'));
793 $md_creator->setKeywordLanguage($ilUser->getPref(
'language'));
794 $md_creator->setLanguage($ilUser->getPref(
'language'));
795 $md_creator->create();
805 include_once(
"Services/MetaData/classes/class.ilMD.php");
806 include_once(
"Services/MetaData/classes/class.ilMDGeneral.php");
807 include_once(
"Services/MetaData/classes/class.ilMDDescription.php");
810 $md_gen =& $md->getGeneral();
816 $md_gen =& $md->getGeneral();
819 $md_gen->setTitle($this->
getTitle());
822 $md_des_ids =& $md_gen->getDescriptionIds();
823 if (count($md_des_ids) > 0)
825 $md_des =& $md_gen->getDescription($md_des_ids[0]);
839 include_once(
'Services/MetaData/classes/class.ilMD.php');
854 $q =
"UPDATE object_data ".
856 "owner = ".$ilDB->quote($this->
getOwner(),
"integer").
", ".
857 "last_update = ".$ilDB->now().
" ".
858 "WHERE obj_id = ".$ilDB->quote($this->
getId(),
"integer");
859 $ilDB->manipulate(
$q);
861 $q =
"SELECT last_update FROM object_data".
862 " WHERE obj_id = ".$ilDB->quote($this->
getId(),
"integer");
863 $obj_set = $ilDB->query(
$q);
864 $obj_rec = $ilDB->fetchAssoc($obj_set);
865 $this->last_update = $obj_rec[
"last_update"];
881 $ilDB->setLimit(1,0);
882 $q =
"SELECT * FROM object_data WHERE import_id = ".$ilDB->quote($a_import_id,
"text").
883 " ORDER BY create_date DESC";
884 $obj_set = $ilDB->query(
$q);
886 if ($obj_rec = $ilDB->fetchAssoc($obj_set))
888 return $obj_rec[
"obj_id"];
905 $query =
"SELECT * FROM object_reference WHERE obj_id = ".
906 $ilDB->quote($a_id,
'integer');
910 while($obj_rec = $ilDB->fetchAssoc(
$res))
912 $ref[$obj_rec[
"ref_id"]] = $obj_rec[
"ref_id"];
925 global $ilObjDataCache;
927 $tit = $ilObjDataCache->lookupTitle($a_id);
939 global $ilObjDataCache;
941 $owner = $ilObjDataCache->lookupOwner($a_id);
950 ?
"SELECT obj_id FROM object_data WHERE title = ".$ilDB->quote(
$title,
"text")
951 :
"SELECT obj_id FROM object_data WHERE ".$ilDB->like(
"title",
"text",
'%'.
$title.
'%');
954 $query .=
" AND type = ".$ilDB->quote(
$type,
"text");
959 $object_ids = array();
962 $object_ids[] =
$row[
'obj_id'];
965 return is_array($object_ids) ? $object_ids : array();
975 global $ilObjDataCache;
977 return $ilObjDataCache->lookupDescription($a_id);
987 global $ilObjDataCache;
995 return $ilObjDataCache->lookupLastUpdate($a_id);
1008 if (!is_array($a_objs))
1010 $a_objs = array($a_objs);
1013 $set = $ilDB->query(
"SELECT max(last_update) as last_update FROM object_data ".
1014 "WHERE ".$ilDB->in(
"obj_id", $a_objs,
false,
"integer").
" ");
1015 $rec = $ilDB->fetchAssoc($set);
1017 return ($rec[
"last_update"]);
1022 global $ilObjDataCache;
1024 return (
int) $ilObjDataCache->lookupObjId($a_id);
1034 $query =
"UPDATE object_reference SET deleted= ".$ilDB->now().
' '.
1035 "WHERE ref_id = ".$ilDB->quote($a_ref_id,
'integer');
1046 $query =
"UPDATE object_reference SET deleted = ".$ilDB->quote(null,
'timestamp').
1047 " WHERE ref_id = ".$ilDB->quote($a_ref_id,
'integer');
1058 $query =
"SELECT deleted FROM object_reference".
1059 " WHERE ref_id = ".$ilDB->quote($a_ref_id,
"integer");
1060 $set = $ilDB->query(
$query);
1061 $rec = $ilDB->fetchAssoc($set);
1063 return $rec[
"deleted"];
1078 $q =
"UPDATE object_data ".
1080 "title = ".$ilDB->quote($a_title,
"text").
",".
1081 "last_update = ".$ilDB->now().
" ".
1082 "WHERE obj_id = ".$ilDB->quote($a_obj_id,
"integer");
1084 $ilDB->manipulate(
$q);
1096 global
$ilDB,$objDefinition;
1101 $q =
"UPDATE object_data ".
1103 "description = ".$ilDB->quote(
$desc,
"text").
",".
1104 "last_update = ".$ilDB->now().
" ".
1105 "WHERE obj_id = ".$ilDB->quote($a_obj_id,
"integer");
1107 $ilDB->manipulate(
$q);
1109 if($objDefinition->isRBACObject($this->getType()))
1112 $res = $ilDB->query(
"SELECT * FROM object_description WHERE obj_id = ".
1113 $ilDB->quote($a_obj_id,
'integer'));
1120 $ilDB->update(
'object_description',$values,array(
'obj_id' => array(
'integer',$this->
getId())));
1126 'obj_id' => array(
'integer',$this->
getId()));
1127 $ilDB->insert(
'object_description',$values);
1143 $q =
"UPDATE object_data ".
1145 "import_id = ".$ilDB->quote($a_import_id,
"text").
",".
1146 "last_update = ".$ilDB->now().
" ".
1147 "WHERE obj_id = ".$ilDB->quote($a_obj_id,
"integer");
1149 $ilDB->manipulate(
$q);
1159 global $ilObjDataCache;
1163 return $ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($a_id));
1165 return $ilObjDataCache->lookupType($a_id);
1169 if ($a_reference ===
true)
1171 $q =
"SELECT type FROM object_reference obr, object_data obd ".
1172 "WHERE obr.ref_id = ".$ilDB->quote($a_id,
"integer").
" ".
1173 "AND obr.obj_id = obd.obj_id ";
1177 $q =
"SELECT type FROM object_data WHERE obj_id = ".$ilDB->quote($a_id,
"integer");
1180 $obj_set = $ilDB->query(
$q);
1181 $obj_rec = $ilDB->fetchAssoc($obj_set);
1183 return $obj_rec[
"type"];
1193 return $tree->isSaved($a_ref_id);
1220 global $ilObjDataCache;
1222 return (
int) $ilObjDataCache->lookupObjId($a_ref_id);
1239 $q =
"SELECT * FROM object_data WHERE type = ".$ilDB->quote($a_type,
"text");
1240 $obj_set = $ilDB->query(
$q);
1243 while ($obj_rec = $ilDB->fetchAssoc($obj_set))
1247 $objects[$obj_rec[
"title"].
".".$obj_rec[
"obj_id"]] = array(
"id" => $obj_rec[
"obj_id"],
1248 "type" => $obj_rec[
"type"],
"title" => $obj_rec[
"title"],
1249 "description" => $obj_rec[
"description"]);
1265 $tree->insertNode($this->
getRefId(), $a_parent_ref);
1268 $log->write(
"ilObject::putInTree(), parent_ref: $a_parent_ref, ref_id: ".
1282 global $rbacadmin, $rbacreview;
1284 $parentRoles = $rbacreview->getParentRoleIds($a_parent_ref);
1286 foreach ($parentRoles as $parRol)
1288 $ops = $rbacreview->getOperationsOfRole($parRol[
"obj_id"], $this->
getType(), $parRol[
"parent"]);
1289 $rbacadmin->grantPermission($parRol[
"obj_id"], $ops, $this->
getRefId());
1303 if (!isset($this->
id))
1305 $message =
"ilObject::createNewReference(): No obj_id given!";
1306 $this->raiseError($message,$this->ilias->error_obj->WARNING);
1309 $next_id = $ilDB->nextId(
'object_reference');
1310 $query =
"INSERT INTO object_reference ".
1311 "(ref_id, obj_id) VALUES (".$ilDB->quote($next_id,
'integer').
','.$ilDB->quote($this->
id ,
'integer').
")";
1312 $this->ilias->db->query(
$query);
1314 $this->ref_id = $next_id;
1315 $this->referenced =
true;
1331 if (!isset($this->
id))
1333 $message =
"ilObject::countReferences(): No obj_id given!";
1334 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
1337 $query =
"SELECT COUNT(ref_id) num FROM object_reference ".
1338 "WHERE obj_id = ".$ilDB->quote($this->
id,
'integer').
" ";
1368 if ($this->type != $db_type)
1370 $message =
"ilObject::delete(): Type mismatch. Object with obj_id: ".$this->id.
" ".
1371 "was instantiated by type '".$this->type.
"'. DB type is: ".$db_type;
1374 $log->write($message);
1377 $this->ilias->raiseError(
"ilObject::delete(): Type mismatch. (".$this->type.
"/".$this->id.
")",$this->ilias->error_obj->WARNING);
1381 $q =
"DELETE FROM object_data ".
1382 "WHERE obj_id = ".$ilDB->quote($this->
getId(),
"integer");
1383 $ilDB->manipulate(
$q);
1386 $query =
"DELETE FROM object_description WHERE obj_id = ".
1387 $ilDB->quote($this->
getId(),
"integer");
1388 $ilDB->manipulate(
$query);
1391 $log->write(
"ilObject::delete(), deleted object, obj_id: ".$this->
getId().
", type: ".
1395 include_once(
"./Services/News/classes/class.ilNewsItem.php");
1397 $news_item->deleteNewsOfContext($this->
getId(), $this->
getType());
1398 include_once(
"./Services/Block/classes/class.ilBlockSetting.php");
1406 $log->write(
"ilObject::delete(), object not deleted, number of references: ".
1412 if ($this->referenced)
1415 $query =
"DELETE FROM object_reference ".
1416 "WHERE ref_id = ".$ilDB->quote($this->
getRefId(),
'integer');
1420 $log->write(
"ilObject::delete(), reference deleted, ref_id: ".$this->
getRefId().
1421 ", obj_id: ".$this->
getId().
", type: ".
1428 $rbacadmin->revokePermission($this->
getRefId(),0,
false);
1435 if ($this->referenced)
1443 $query =
"DELETE FROM dav_property ".
1444 "WHERE obj_id = ".$ilDB->quote($this->
getId(),
'integer');
1448 include_once
'./Services/Tracking/classes/class.ilChangeEvent.php';
1482 if ($rolf_data = $rbacreview->getRoleFolderofObject($this->getRefId()))
1484 $rfoldObj = $this->ilias->obj_factory->getInstanceByRefId($rolf_data[
"ref_id"]);
1488 include_once (
"./Services/AccessControl/classes/class.ilObjRoleFolder.php");
1490 $rfoldObj->setTitle($this->
getId());
1491 $rfoldObj->setDescription(
" (ref_id ".$this->
getRefId().
")");
1492 $rfoldObj->create();
1493 $rfoldObj->createReference();
1494 $rfoldObj->putInTree($this->
getRefId());
1495 $rfoldObj->setPermissions($this->
getRefId());
1515 $q =
"SELECT * FROM object_data ".
1516 "LEFT JOIN object_reference ON object_reference.obj_id=object_data.obj_id ".
1517 "WHERE object_reference.ref_id= ".$ilDB->quote($a_id,
"integer");
1521 $q =
"SELECT * FROM object_data WHERE obj_id=".$ilDB->quote($a_id,
"integer");
1524 $r = $ilDB->query(
$q);
1526 return $ilDB->numRows($r) ?
true :
false;
1541 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
1545 $parent_id = (int) $tree->getParentId($a_node_id);
1547 if ($parent_id != 0)
1549 $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
1550 $obj_data->notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$parent_id,$a_params);
1559 $this->
register = (bool) $a_bool;
1591 $order =
" ORDER BY title";
1596 $where_clause =
"WHERE type = ".
1597 $ilDB->quote($a_obj_type,
"text");
1601 $where_clause.=
" AND owner = ".$ilDB->quote($a_owner,
"integer");
1605 $q =
"SELECT * FROM object_data ".$where_clause.$order;
1606 $r = $ilDB->query(
$q);
1609 if ($ilDB->numRows($r) > 0)
1611 while (
$row = $ilDB->fetchAssoc($r))
1613 $row[
"desc"] =
$row[
"description"];
1633 $query =
"SELECT obj_data.title obj_title,path_data.title path_title,child FROM tree ".
1634 "JOIN object_reference obj_ref ON child = obj_ref.ref_id ".
1635 "JOIN object_data obj_data ON obj_ref.obj_id = obj_data.obj_id ".
1636 "JOIN object_reference path_ref ON parent = path_ref.ref_id ".
1637 "JOIN object_data path_data ON path_ref.obj_id = path_data.obj_id ".
1638 "WHERE ".$ilDB->in(
"child", $a_ref_ids,
false,
"integer").
" ".
1639 "ORDER BY obj_data.title ";
1642 if (!$objDefinition->isPlugin($new_type))
1644 $options[0] = $lng->txt(
'obj_'.$new_type.
'_select');
1648 include_once(
"./Services/Component/classes/class.ilPlugin.php");
1652 while(
$row = $ilDB->fetchObject(
$res))
1658 if(strlen($path =
$row->path_title) > 40)
1660 $path = substr($path,0,40).
'...';
1664 $options[
$row->child] = (
$title.
' ('.$lng->txt(
'path').
': '.$path.
')');
1666 return $options ? $options : array();
1680 global $objDefinition,$ilUser,$rbacadmin,
$ilDB;
1683 $class_name = (
'ilObj'.$objDefinition->getClassName($this->
getType()));
1688 include_once(
$location.
"/class.".$class_name.
".php");
1689 $new_obj =
new $class_name(0,
false);
1690 $new_obj->setOwner($ilUser->getId());
1691 $new_obj->setTitle(
$title);
1693 $new_obj->setType($this->
getType());
1695 $new_obj->create(
true);
1696 $new_obj->createReference();
1697 $new_obj->putInTree($a_target_id);
1698 $new_obj->setPermissions($a_target_id);
1699 $new_obj->initDefaultRoles();
1702 $rbacadmin->copyLocalRoles($this->
getRefId(),$new_obj->getRefId());
1704 include_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
1708 $query =
"INSERT INTO dav_property (obj_id,node_id,ns,name,value) ".
1709 "SELECT ".$ilDB->quote($new_obj->getId(),
'integer').
",node_id,ns,name,value ".
1710 "FROM dav_property ".
1711 "WHERE obj_id = ".$ilDB->quote($this->getId(),
'integer');
1712 $res = $ilDB->manipulate($query);
1729 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
1731 if(!$cp_options->isRootNode($this->getRefId()))
1735 $nodes = $tree->getChilds($a_target_id);
1737 $title_unique =
false;
1738 require_once
'Modules/File/classes/class.ilObjFileAccess.php';
1741 while(!$title_unique)
1744 foreach($nodes as $node)
1746 if((
$title == $node[
'title']) and ($this->
getType() == $node[
'type']))
1794 include_once
"./Services/MetaData/classes/class.ilMD.php";
1796 $md->cloneMD($target_obj->getId(),0,$target_obj->getType());
1808 public static function _getIcon($a_obj_id =
"", $a_size =
"big", $a_type =
"",
1813 if ($a_obj_id ==
"" && $a_type ==
"")
1828 if ($ilSetting->get(
"custom_icons") &&
1829 in_array($a_type, array(
"cat",
"grp",
"crs",
"root")))
1831 require_once(
"./Services/Container/classes/class.ilContainer.php");
1835 $file_name = $cont_dir.
"/icon_".$a_size.
".gif";
1846 case "small": $suff =
"";
break;
1847 case "tiny": $suff =
"_s";
break;
1848 default: $suff =
"_b";
break;
1852 if ($objDefinition->isRBACObject($a_type))
1854 if (!$objDefinition->isPlugin($a_type))
1860 include_once(
"./Services/Repository/classes/class.ilRepositoryObjectPlugin.php");
1868 return "./images/icon_".$a_type.$suff.
".gif";