24 require_once
"./classes/class.ilObject.php";
35 public static $purposes = array (
"Standard",
"VideoPortable",
"AudioPortable");
55 $this->
ilObject($a_id,$a_call_by_reference);
67 $this->online = $a_online;
87 $this->publicfiles = $a_publicfiles;
107 $this->itemsarray = $a_itemsarray;
117 return $this->itemsarray;
127 $this->downloadable = $a_downloadable;
154 $this->defaultAccess = (int) $value == 0 ? 0 : 1;
168 $query =
"INSERT INTO il_media_cast_data (".
175 $ilDB->quote($this->
getId())
181 $ilDB->query($query);
195 if (!parent::update())
201 $query =
"UPDATE il_media_cast_data SET ".
202 " online = ".$ilDB->quote($this->
getOnline()).
206 " WHERE id = ".$ilDB->quote($this->
getId());
208 $ilDB->query($query);
223 $query =
"SELECT * FROM il_media_cast_data WHERE id = ".
224 $ilDB->quote($this->
getId());
225 $set = $ilDB->query($query);
247 if (!parent::delete())
254 foreach ($med_items as $item)
256 include_once(
"./Services/News/classes/class.ilNewsItem.php");
258 $news_item->delete();
262 $query =
"DELETE FROM il_media_cast_data".
263 " WHERE id = ".$ilDB->quote($this->
getId());
264 $ilDB->query($query);
292 return $roles ? $roles : array();
308 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
348 if ($a_node_id==
$_GET[
"ref_id"])
350 $parent_obj =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
351 $parent_type = $parent_obj->getType();
352 if($parent_type == $this->
getType())
354 $a_node_id = (int) $tree->getParentId($a_node_id);
358 parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
369 include_once(
"./Services/News/classes/class.ilNewsItem.php");
371 $it->setContextObjId($this->
getId());
372 $it->setContextObjType($this->
getType());
373 $this->itemsarray = $it->queryNewsForContext(
false);
375 return $this->itemsarray;