24 define(
"NEWS_TEXT",
"text");
25 define(
"NEWS_HTML",
"html");
26 define(
"NEWS_AUDIO",
"audio");
27 define(
"NEWS_USERS",
"users");
28 define(
"NEWS_PUBLIC",
"public");
101 $this->title = $a_title;
121 $this->content = $a_content;
141 $this->context_obj_id = $a_context_obj_id;
161 $this->context_obj_type = $a_context_obj_type;
181 $this->context_sub_obj_id = $a_context_sub_obj_id;
201 $this->context_sub_obj_type = $a_context_sub_obj_type;
221 $this->content_type = $a_content_type;
241 $this->creation_date = $a_creation_date;
261 $this->update_date = $a_update_date;
281 $this->user_id = $a_user_id;
301 $this->visibility = $a_visibility;
321 $this->content_long = $a_content_long;
341 $this->priority = $a_priority;
361 $this->content_is_lang_var = $a_content_is_lang_var;
381 $this->mob_id = $a_mob_id;
401 $this->playtime = $a_playtime;
430 public function delete()
434 $query =
"DELETE FROM il_news_item".
435 " WHERE id = ".$ilDB->quote($this->
getId(),
"integer");
437 $ilDB->manipulate(
$query);
449 $query =
"SELECT id, title, content, context_obj_id, context_obj_type, context_sub_obj_id, context_sub_obj_type, content_type, creation_date, update_date, user_id, visibility, content_long, priority, content_is_lang_var, mob_id, playtime ".
450 "FROM il_news_item ".
456 " ORDER BY creation_date DESC ".
458 $set = $ilDB->query(
$query);
460 while($rec = $ilDB->fetchAssoc($set))
477 $query =
"SELECT id, title, content, context_obj_id, context_obj_type, context_sub_obj_id, context_sub_obj_type, content_type, creation_date, update_date, user_id, visibility, content_long, priority, content_is_lang_var, mob_id, playtime ".
478 "FROM il_news_item ".
484 " AND visibility = ".$ilDB->quote($this->
getVisibility(),
"text").
485 " ORDER BY creation_date DESC ".
488 $set = $ilDB->query(
$query);
490 while($rec = $ilDB->fetchAssoc($set))
getContextSubObjType()
Get ContextSubObjType.
getPriority()
Get Priority.
setContextObjId($a_context_obj_id)
Set ContextObjId.
setPlaytime($a_playtime)
Set Playtime.
setContentLong($a_content_long)
Set ContentLong.
setPriority($a_priority=1)
Set Priority.
getContentIsLangVar()
Get ContentIsLangVar.
setContent($a_content)
Set Content.
setUserId($a_user_id)
Set UserId.
setContextSubObjId($a_context_sub_obj_id)
Set ContextSubObjId.
setMobId($a_mob_id)
Set MobId.
getContextSubObjId()
Get ContextSubObjId.
setCreationDate($a_creation_date)
Set CreationDate.
setContextObjType($a_context_obj_type)
Set ContextObjType.
getContextObjId()
Get ContextObjId.
getContextObjType()
Get ContextObjType.
setUpdateDate($a_update_date)
Set UpdateDate.
getContentType()
Get ContentType.
A news item can be created by different sources.
getUpdateDate()
Get UpdateDate.
getContentLong()
Get ContentLong.
setVisibility($a_visibility="users")
Set Visibility.
setTitle($a_title)
Set Title.
getVisibility()
Get Visibility.
setContentIsLangVar($a_content_is_lang_var=0)
Set ContentIsLangVar.
getCreationDate()
Get CreationDate.
queryNewsForVisibility()
Query NewsForVisibility.
__construct($a_id=0)
Constructor.
setContextSubObjType($a_context_sub_obj_type)
Set ContextSubObjType.
queryNewsForContext()
Query NewsForContext.
getPlaytime()
Get Playtime.
setContentType($a_content_type="text")
Set ContentType.