25 require_once
"classes/class.ilObject.php";
26 require_once
"./Services/MetaData/classes/class.ilMDLanguageItem.php";
27 require_once(
"./Modules/Folder/classes/class.ilObjFolder.php");
55 $this->
ilObject($a_id,$a_call_by_reference);
78 $tree->setTreeTablePK(
"mep_id");
79 $tree->setTableNames(
"mep_tree",
"object_data");
93 $this->tree->setTreeTablePK(
"mep_id");
94 $this->tree->setTableNames(
'mep_tree',
'object_data');
95 $this->tree->addTree($this->
getId(), 1);
115 if (!parent::update())
139 if (!parent::delete())
145 $childs = $this->tree->getSubTree($this->tree->getNodeData($this->tree->readRootId()));
148 $this->tree->removeTree($this->tree->getTreeId());
151 foreach ($childs as $child)
153 switch ($child[
"type"])
156 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
162 include_once(
"./Modules/Folder/classes/class.ilObjFolder.php");
197 return $roles ? $roles : array();
213 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
253 if ($a_node_id==
$_GET[
"ref_id"])
255 $parent_obj =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
256 $parent_type = $parent_obj->getType();
257 if($parent_type == $this->
getType())
259 $a_node_id = (int) $tree->getParentId($a_node_id);
263 parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
276 $obj_id = $this->tree->getRootId();
279 if ($a_type !=
"mob")
281 $objs = $this->tree->getChildsByType($obj_id,
"fold");
283 if ($a_type !=
"fold")
285 $mobs = $this->tree->getChildsByType($obj_id,
"mob");
287 foreach(
$mobs as $key => $mob)
301 if ($obj_id == $this->tree->getRootId())
306 return $this->tree->getParentId($obj_id);
311 if (!$this->tree->isInTree($a_obj_id))
313 $parent = ($a_parent ==
"")
314 ? $this->tree->getRootId()
316 $this->tree->insertNode($a_obj_id, $parent);
332 $node_data = $this->tree->getNodeData($obj_id);
333 $subtree = $this->tree->getSubtree($node_data);
336 if($this->tree->isInTree($obj_id))
338 $this->tree->deleteTree($node_data);
342 foreach ($subtree as $node)
344 if ($node[
"type"] ==
"mob")
350 if ($node[
"type"] ==
"fold")