ILIAS
release_8 Revision v8.19
|
A news item can be created by different sources. More...
Public Member Functions | |
__construct (int $a_id=0) | |
setId (int $a_id) | |
getId () | |
setTitle (string $a_title) | |
getTitle () | |
setContent (string $a_content) | |
getContent () | |
setContextObjId (int $a_context_obj_id) | |
getContextObjId () | |
setContextObjType (string $a_context_obj_type) | |
getContextObjType () | |
setContextSubObjId (int $a_context_sub_obj_id) | |
getContextSubObjId () | |
setContextSubObjType (?string $a_context_sub_obj_type) | |
getContextSubObjType () | |
setContentType (string $a_content_type="text") | |
getContentType () | |
setCreationDate (string $a_creation_date) | |
getCreationDate () | |
setUpdateDate (string $a_update_date) | |
getUpdateDate () | |
setUserId (int $a_user_id) | |
getUserId () | |
setUpdateUserId (int $a_val) | |
getUpdateUserId () | |
setVisibility (string $a_visibility="users") | |
getVisibility () | |
setContentLong (string $a_content_long) | |
getContentLong () | |
setPriority (int $a_priority=1) | |
getPriority () | |
setContentIsLangVar (bool $a_content_is_lang_var=false) | |
getContentIsLangVar () | |
setMobId (int $a_mob_id) | |
getMobId () | |
setPlaytime (string $a_playtime) | |
getPlaytime () | |
setLimitation (bool $a_limitation) | |
Set Limitation for number of items. More... | |
getLimitation () | |
setContentTextIsLangVar (bool $a_val=false) | |
getContentTextIsLangVar () | |
setMobPlayCounter (int $a_val) | |
getMobPlayCounter () | |
setMobDownloadCounter (int $a_val) | |
getMobDownloadCounter () | |
setContentHtml (bool $a_val) | |
getContentHtml () | |
read () | |
Read item from database. More... | |
create () | |
Create. More... | |
update (bool $a_as_new=false) | |
Update item in database. More... | |
getNewsForRefId (int $a_ref_id, bool $a_only_public=false, bool $a_stopnesting=false, $a_time_period=0, bool $a_prevent_aggregation=true, bool $a_forum_group_sequences=false, bool $a_no_auto_generated=false, bool $a_ignore_date_filter=false, int $a_user_id=null, int $a_limit=0, array $a_excluded=[]) | |
Get News For Ref Id. More... | |
getAggregatedNewsData (int $a_ref_id, bool $a_only_public=false, $a_time_period=0, bool $a_prevent_aggregation=false, string $a_starting_date="", bool $a_no_auto_generated=false, int $a_user_id=null, int $a_limit=0, array $a_exclude=[]) | |
Get news aggregation (e.g. More... | |
setContext (int $a_obj_id, string $a_obj_type, int $a_sub_obj_id=0, string $a_sub_obj_type="") | |
Set context for news. More... | |
queryNewsForContext (bool $a_for_rss_use=false, $a_time_period=0, string $a_starting_date="", bool $a_no_auto_generated=false, bool $a_oldest_first=false, int $a_limit=0) | |
Query news for a context. More... | |
checkNewsExistsForObjects (array $objects, $a_time_period=1) | |
queryNewsForMultipleContexts (array $a_contexts, bool $a_for_rss_use=false, $a_time_period=0, string $a_starting_date="", bool $a_no_auto_generated=false, int $a_user_id=null, int $a_limit=0, array $a_exclude=[]) | |
delete () | |
Delete news item. More... | |
deliverMobFile (string $a_purpose="Standard", bool $a_increase_download_cnt=false) | |
Deliver mob file. More... | |
increaseDownloadCounter () | |
Increase download counter. More... | |
increasePlayCounter () | |
Increase play counter. More... | |
Static Public Member Functions | |
static | _getNewsItemsOfUser (int $a_user_id, bool $a_only_public=false, bool $a_prevent_aggregation=false, int $a_per=0, array &$a_cnt=[]) |
Get all news items for a user. More... | |
static | queryNewsByIds (array $a_news_ids) |
Query news data by news ids. More... | |
static | _setRead (int $a_user_id, int $a_news_id) |
Set item read. More... | |
static | _setUnread (int $a_user_id, int $a_news_id) |
Set item unread. More... | |
static | mergeNews (array $n1, array $n2) |
Merges two sets of news. More... | |
static | _getDefaultVisibilityForRefId (int $a_ref_id) |
Get default visibility for reference id. More... | |
static | getNewsOfContext (int $a_context_obj_id, string $a_context_obj_type, int $a_context_sub_obj_id=0, string $a_context_sub_obj_type="") |
Get all news of a context. More... | |
static | deleteNewsOfContext (int $a_context_obj_id, string $a_context_obj_type, int $a_context_sub_obj_id=0, string $a_context_sub_obj_type="") |
Delete all news of a context. More... | |
static | _lookupTitle (int $a_news_id) |
Lookup News Title. More... | |
static | _lookupVisibility (int $a_news_id) |
Lookup News Visibility. More... | |
static | _lookupMobId (int $a_news_id) |
Lookup mob id. More... | |
static | filterObjIdsPerNews (array $a_obj_ids, $a_time_period=0, string $a_starting_date="", string $a_ending_date='', bool $ignore_period=false) |
Checks whether news are available for. More... | |
static | determineNewsTitleByNewsId (int $a_news_id, int $a_agg_ref_id=0, array $a_aggregation=[]) |
Determine title for news item entry. More... | |
static | determineNewsTitle (string $a_context_obj_type, string $a_title, bool $a_content_is_lang_var, int $a_agg_ref_id=0, array $a_aggregation=[]) |
Determine title for news item entry. More... | |
static | determineNewsContent (string $a_context_obj_type, string $a_content, bool $a_is_lang_var) |
Determine new content. More... | |
static | getFirstNewsIdForContext (int $a_context_obj_id, string $a_context_obj_type, int $a_context_sub_obj_id=0, string $a_context_sub_obj_type="") |
Get first new id of news set related to a certain context. More... | |
static | getLastNewsIdForContext (int $a_context_obj_id, string $a_context_obj_type, int $a_context_sub_obj_id=0, string $a_context_sub_obj_type="", bool $a_only_today=false) |
Get last news id of news set related to a certain context. More... | |
static | _lookupMediaObjectUsages (int $a_mob_id) |
Lookup media object usage(s) More... | |
static | _lookupContextObjId (int $a_news_id) |
Context Object ID. More... | |
static | _lookupDefaultPDPeriod () |
static | _lookupUserPDPeriod (int $a_user_id) |
static | _lookupRSSPeriod () |
static | setPrivateFeedId (int $a_userId) |
static | getPrivateFeedId () |
static | prepareNewsDataFromCache (array $a_cres) |
Prepare news data from cache. More... | |
Protected Member Functions | |
aggregateForums (array $news, bool $a_group_posting_sequence=false) | |
aggregateFiles (array $news, int $a_ref_id) | |
getAggregatedChildNewsData (int $a_ref_id, bool $a_only_public=false, int $a_time_period=0, bool $a_prevent_aggregation=false, string $a_starting_date="", bool $a_no_auto_generated=false) | |
Get news aggregation for child objects (e.g. More... | |
Static Protected Member Functions | |
static | handleTimePeriod ($a_time_period) |
Convert time period for DB-queries. More... | |
Protected Attributes | |
int | $mob_cnt_play = 0 |
ilDBInterface | $db |
ilTree | $tree |
ilAccessHandler | $access |
ilObjectDataCache | $obj_data_cache |
ilObjUser | $user |
ilLanguage | $lng |
ilCtrl | $ctrl |
int | $id = 0 |
string | $title = "" |
string | $content = "" |
bool | $content_html = false |
int | $context_obj_id = 0 |
string | $context_obj_type = "" |
int | $context_sub_obj_id = 0 |
string | $context_sub_obj_type = null |
string | $content_type = "text" |
string | $creation_date = "" |
string | $update_date = "" |
int | $user_id = 0 |
int | $update_user_id = 0 |
string | $visibility = "users" |
string | $content_long = "" |
int | $priority = 1 |
bool | $content_is_lang_var = false |
int | $mob_id = 0 |
string | $playtime = "" |
bool | $content_text_is_lang_var = false |
ilLogger | $log |
Private Attributes | |
int | $mob_cnt_download = 0 |
bool | $limitation = false |
ilGlobalTemplateInterface | $main_tpl |
Static Private Attributes | |
static int | $privFeedId = 0 |
A news item can be created by different sources.
E.g. when a new forum posting is created, or when a change in a learning module is announced.
Please note that this class contains a lot of deprectated functions that will be move to other classes in the future. Please avoid to use these functions. This class should be a pure data class without persistence in the future.
Definition at line 40 of file class.ilNewsItem.php.
ilNewsItem::__construct | ( | int | $a_id = 0 | ) |
Definition at line 76 of file class.ilNewsItem.php.
References $DIC, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), read(), setId(), and ILIAS\Repository\user().
|
static |
Get default visibility for reference id.
Definition at line 1358 of file class.ilNewsItem.php.
References $DIC, ILIAS\LTI\ToolProvider\$key, $path, $visibility, ilBlockSetting\_lookup(), ilTree\getPathFull(), and ilTree\isInTree().
Referenced by ilNewsForContextBlockGUI\addToSettingsForm(), createProperties(), ilObjForum\createSettings(), ilNewsItemGUI\getEditForm(), and ilNewsForContextBlockGUI\initSettingsForm().
|
static |
Get all news items for a user.
Definition at line 499 of file class.ilNewsItem.php.
References $data, $DIC, $i, $ref_id, ilObject\_getAllReferences(), ilParticipants\_getMembershipByType(), ilObject\_lookupObjId(), ilObjUser\_lookupPref(), ilObject\_lookupType(), ILIAS\Repository\int(), and ilArrayUtil\sortArray().
Referenced by ilUserFeedWriter\__construct(), ilPDNewsBlockGUI\getNewsData(), and ilPDNewsGUI\view().
|
static |
Context Object ID.
Definition at line 1787 of file class.ilNewsItem.php.
References $DIC, $ilDB, and $query.
Referenced by ilNewsItemGUI\executeCommand(), ilMediaObjectUsagesTableGUI\fillRow(), ilObjMediaObject\getParentObjectIdForUsage(), and ilNewsForContextBlockGUI\showNews().
|
static |
Definition at line 1806 of file class.ilNewsItem.php.
Referenced by ilPDNewsBlockGUI\editSettings(), ilObjNewsSettingsGUI\getSettingsForm(), and ilPDNewsTableGUI\initFilter().
|
static |
Lookup media object usage(s)
Definition at line 1763 of file class.ilNewsItem.php.
References $DIC, $ilDB, and $query.
Referenced by ilObjMediaObject\lookupUsages().
|
static |
Lookup mob id.
Definition at line 1520 of file class.ilNewsItem.php.
References $DIC, $ilDB, and $query.
Referenced by ilNewsExporter\getXmlExportHeadDependencies().
|
static |
Definition at line 1848 of file class.ilNewsItem.php.
Referenced by ilObjectFeedWriter\__construct(), ilUserFeedWriter\__construct(), ilObjNewsSettingsGUI\getSettingsForm(), and ilObjMediaCastGUI\initSettingsForm().
|
static |
Lookup News Title.
Definition at line 1485 of file class.ilNewsItem.php.
References $DIC, $ilDB, and $query.
|
static |
Definition at line 1820 of file class.ilNewsItem.php.
References ilBlockSetting\_lookup().
Referenced by ilPDNewsBlockGUI\editSettings(), ilPDNewsBlockGUI\getNewsData(), ilPDNewsTableGUI\initFilter(), and ilPDNewsGUI\view().
|
static |
Lookup News Visibility.
Definition at line 1502 of file class.ilNewsItem.php.
References $DIC, $ilDB, $query, and NEWS_USERS.
Referenced by ilObjMediaObjectAccess\checkAccessMob().
|
static |
Set item read.
Definition at line 1290 of file class.ilNewsItem.php.
Referenced by ilNewsForContextBlockGUI\showNews().
|
static |
Set item unread.
Definition at line 1319 of file class.ilNewsItem.php.
|
protected |
Definition at line 875 of file class.ilNewsItem.php.
Referenced by getAggregatedChildNewsData(), and getAggregatedNewsData().
|
protected |
Definition at line 827 of file class.ilNewsItem.php.
Referenced by getNewsForRefId().
ilNewsItem::checkNewsExistsForObjects | ( | array | $objects, |
$a_time_period = 1 |
|||
) |
string | int | $a_time_period |
Definition at line 1158 of file class.ilNewsItem.php.
References $db, $ilDB, $query, and ILIAS\Repository\int().
ilNewsItem::create | ( | ) |
Create.
Definition at line 380 of file class.ilNewsItem.php.
References $db, $ilDB, $query, getContent(), getContentHtml(), getContentIsLangVar(), getContentLong(), getContentTextIsLangVar(), getContentType(), getContextObjId(), getContextObjType(), getContextSubObjId(), getContextSubObjType(), getId(), getLimitation(), getMobId(), getPlaytime(), getPriority(), getTitle(), getUpdateUserId(), getUserId(), getVisibility(), ilUtil\now(), and setId().
Referenced by ilNewsData\save().
ilNewsItem::delete | ( | ) |
Delete news item.
Definition at line 1398 of file class.ilNewsItem.php.
References $db, $ilDB, $query, ilObject\_exists(), getId(), and getMobId().
Referenced by ilNewsTimelineGUI\remove().
|
static |
Delete all news of a context.
Definition at line 1465 of file class.ilNewsItem.php.
Referenced by ilBlogPosting\delete(), ilPageObject\delete(), ilObjTest\saveToDb(), and ilBlogPosting\unpublish().
ilNewsItem::deliverMobFile | ( | string | $a_purpose = "Standard" , |
bool | $a_increase_download_cnt = false |
||
) |
Deliver mob file.
Definition at line 1878 of file class.ilNewsItem.php.
References ilObjMediaObject\_getDirectory(), ilFileDelivery\deliverFileLegacy(), getMobId(), increaseDownloadCounter(), and ilUtil\redirect().
|
static |
Determine new content.
Definition at line 1667 of file class.ilNewsItem.php.
References $DIC, ilLanguage\loadLanguageModule(), ilObjectPlugin\lookupTxtById(), and ilLanguage\txt().
Referenced by ilObjectFeedWriter\__construct(), ilUserFeedWriter\__construct(), ilPDNewsTableGUI\fillRow(), ilNewsDefaultRendererGUI\getDetailContent(), and ilMembershipCronNotifications\run().
|
static |
Determine title for news item entry.
Definition at line 1603 of file class.ilNewsItem.php.
References $DIC, ilObjectPlugin\lookupTxtById(), and ilLanguage\txt().
Referenced by ilObjectFeedWriter\__construct(), ilUserFeedWriter\__construct(), ilPDNewsTableGUI\fillRow(), ilNewsForContextBlockGUI\getInfoForData(), ilNewsTimelineItemGUI\render(), ilMembershipCronNotifications\run(), and ilNewsForContextBlockGUI\showNews().
|
static |
Determine title for news item entry.
Definition at line 1576 of file class.ilNewsItem.php.
References $DIC, $ilDB, and $query.
|
static |
Checks whether news are available for.
array | $a_obj_ids | |
string | int | $a_time_period |
Definition at line 1539 of file class.ilNewsItem.php.
References $DIC, $ilDB, and $query.
Referenced by ilPDNewsGUI\view().
|
protected |
Get news aggregation for child objects (e.g.
for categories)
Definition at line 907 of file class.ilNewsItem.php.
References $access, $data, $ref_id, $tree, aggregateFiles(), ilTree\getChilds(), getNewsForRefId(), queryNewsForMultipleContexts(), and ilArrayUtil\sortArray().
Referenced by getNewsForRefId().
ilNewsItem::getAggregatedNewsData | ( | int | $a_ref_id, |
bool | $a_only_public = false , |
||
$a_time_period = 0 , |
|||
bool | $a_prevent_aggregation = false , |
||
string | $a_starting_date = "" , |
||
bool | $a_no_auto_generated = false , |
||
int | $a_user_id = null , |
||
int | $a_limit = 0 , |
||
array | $a_exclude = [] |
||
) |
Get news aggregation (e.g.
for courses, groups)
string | int | $a_time_period |
Definition at line 720 of file class.ilNewsItem.php.
References $access, $data, $obj_data_cache, $ref_id, $tree, aggregateFiles(), ilTree\getNodeData(), ilTree\getSubTree(), ILIAS\Repository\int(), ilObjectActivation\preloadData(), queryNewsForMultipleContexts(), and ilArrayUtil\sortArray().
Referenced by getNewsForRefId().
ilNewsItem::getContent | ( | ) |
Definition at line 121 of file class.ilNewsItem.php.
References $content.
Referenced by create(), and update().
ilNewsItem::getContentHtml | ( | ) |
Definition at line 335 of file class.ilNewsItem.php.
References $content_html.
Referenced by create(), and update().
ilNewsItem::getContentIsLangVar | ( | ) |
Definition at line 259 of file class.ilNewsItem.php.
References $content_is_lang_var.
Referenced by create(), and update().
ilNewsItem::getContentLong | ( | ) |
Definition at line 238 of file class.ilNewsItem.php.
References $content_long.
Referenced by create(), and update().
ilNewsItem::getContentTextIsLangVar | ( | ) |
Definition at line 305 of file class.ilNewsItem.php.
References $content_text_is_lang_var.
Referenced by create(), and update().
ilNewsItem::getContentType | ( | ) |
Definition at line 171 of file class.ilNewsItem.php.
References $content_type.
Referenced by create(), and update().
ilNewsItem::getContextObjId | ( | ) |
Definition at line 131 of file class.ilNewsItem.php.
References $context_obj_id.
Referenced by create(), queryNewsForContext(), and update().
ilNewsItem::getContextObjType | ( | ) |
Definition at line 141 of file class.ilNewsItem.php.
References $context_obj_type.
Referenced by create(), queryNewsForContext(), and update().
ilNewsItem::getContextSubObjId | ( | ) |
Definition at line 151 of file class.ilNewsItem.php.
References $context_sub_obj_id.
Referenced by create(), queryNewsForContext(), and update().
ilNewsItem::getContextSubObjType | ( | ) |
Definition at line 161 of file class.ilNewsItem.php.
References $context_sub_obj_type.
Referenced by create(), queryNewsForContext(), and update().
ilNewsItem::getCreationDate | ( | ) |
|
static |
Get first new id of news set related to a certain context.
Definition at line 1692 of file class.ilNewsItem.php.
References $DIC, $ilDB, and $query.
Referenced by ilForum\deletePost(), ilForumTopic\movePosts(), ilForum\postCensorship(), ilObjForumGUI\savePostObject(), and ilObjTest\saveToDb().
ilNewsItem::getId | ( | ) |
Definition at line 101 of file class.ilNewsItem.php.
References $id.
Referenced by create(), delete(), ilObjMediaCastGUI\determinePlaytimeObject(), increaseDownloadCounter(), increasePlayCounter(), read(), ilNewsTimelineItemGUI\renderMedia(), ilNewsTimelineItemGUI\renderMediaModal(), ilNewsData\save(), and update().
|
static |
Get last news id of news set related to a certain context.
Definition at line 1721 of file class.ilNewsItem.php.
References $DIC, $id, $ilDB, $query, ILIAS\Repository\int(), and ilUtil\now().
Referenced by ilBlogPosting\handleNews(), and ilWikiPage\updateNews().
ilNewsItem::getLimitation | ( | ) |
Definition at line 295 of file class.ilNewsItem.php.
References $limitation.
Referenced by create().
ilNewsItem::getMobDownloadCounter | ( | ) |
Definition at line 325 of file class.ilNewsItem.php.
References $mob_cnt_download.
Referenced by increaseDownloadCounter(), and update().
ilNewsItem::getMobId | ( | ) |
Definition at line 269 of file class.ilNewsItem.php.
References $mob_id.
Referenced by create(), delete(), deliverMobFile(), ilObjMediaCastGUI\determinePlaytimeObject(), ilNewsTimelineItemGUI\getMediaPath(), update(), and ilObjMediaCastGUI\updateCastItemObject().
ilNewsItem::getMobPlayCounter | ( | ) |
Definition at line 315 of file class.ilNewsItem.php.
References $mob_cnt_play.
Referenced by increasePlayCounter(), and update().
ilNewsItem::getNewsForRefId | ( | int | $a_ref_id, |
bool | $a_only_public = false , |
||
bool | $a_stopnesting = false , |
||
$a_time_period = 0 , |
|||
bool | $a_prevent_aggregation = true , |
||
bool | $a_forum_group_sequences = false , |
||
bool | $a_no_auto_generated = false , |
||
bool | $a_ignore_date_filter = false , |
||
int | $a_user_id = null , |
||
int | $a_limit = 0 , |
||
array | $a_excluded = [] |
||
) |
Get News For Ref Id.
string | int | $a_time_period | |
int | $a_limit | currently only supported for groups and courses |
int[] | $a_excluded currently only supported for groups and courses (news ids) |
Definition at line 601 of file class.ilNewsItem.php.
References ilBlockSetting\_lookup(), ilContainer\_lookupContainerSetting(), ilObject\_lookupObjId(), ilObject\_lookupType(), aggregateForums(), getAggregatedChildNewsData(), getAggregatedNewsData(), and NEWS_PUBLIC.
Referenced by getAggregatedChildNewsData(), and ilNewsItemGUI\getNewsForContextTable().
|
static |
Get all news of a context.
Definition at line 1426 of file class.ilNewsItem.php.
References $DIC, $ilDB, and $query.
Referenced by ilNewsData\getNewsOfContext().
ilNewsItem::getPlaytime | ( | ) |
Definition at line 282 of file class.ilNewsItem.php.
References $playtime.
Referenced by create(), and update().
ilNewsItem::getPriority | ( | ) |
Definition at line 248 of file class.ilNewsItem.php.
References $priority.
Referenced by ILIAS\News\Access\NewsAccess\canEdit(), create(), and update().
|
static |
Definition at line 1869 of file class.ilNewsItem.php.
ilNewsItem::getTitle | ( | ) |
Definition at line 111 of file class.ilNewsItem.php.
References $title.
Referenced by create(), and update().
ilNewsItem::getUpdateDate | ( | ) |
ilNewsItem::getUpdateUserId | ( | ) |
Definition at line 211 of file class.ilNewsItem.php.
References $update_user_id.
Referenced by create(), and update().
ilNewsItem::getUserId | ( | ) |
Definition at line 201 of file class.ilNewsItem.php.
References $user_id.
Referenced by ILIAS\News\Access\NewsAccess\canEdit(), create(), and update().
ilNewsItem::getVisibility | ( | ) |
Definition at line 225 of file class.ilNewsItem.php.
References $visibility.
Referenced by create(), and update().
|
staticprotected |
Convert time period for DB-queries.
string | int | $a_time_period |
Definition at line 1003 of file class.ilNewsItem.php.
ilNewsItem::increaseDownloadCounter | ( | ) |
Increase download counter.
Definition at line 1917 of file class.ilNewsItem.php.
References $db, $ilDB, getId(), getMobDownloadCounter(), and setMobDownloadCounter().
Referenced by deliverMobFile().
ilNewsItem::increasePlayCounter | ( | ) |
Increase play counter.
Definition at line 1936 of file class.ilNewsItem.php.
References $db, $ilDB, getId(), getMobPlayCounter(), and setMobPlayCounter().
|
static |
Merges two sets of news.
Definition at line 1343 of file class.ilNewsItem.php.
References $id.
|
static |
Prepare news data from cache.
Definition at line 1954 of file class.ilNewsItem.php.
References $data, $DIC, $ilDB, and ILIAS\Repository\int().
Referenced by ilPDNewsBlockGUI\__construct(), and ilNewsForContextBlockGUI\__construct().
|
static |
Query news data by news ids.
int[] | $a_news_ids |
Definition at line 1140 of file class.ilNewsItem.php.
Referenced by ilMembershipCronNotificationsData\loadMissingNews().
ilNewsItem::queryNewsForContext | ( | bool | $a_for_rss_use = false , |
$a_time_period = 0 , |
|||
string | $a_starting_date = "" , |
||
bool | $a_no_auto_generated = false , |
||
bool | $a_oldest_first = false , |
||
int | $a_limit = 0 |
||
) |
Query news for a context.
string | int | $a_time_period |
Definition at line 1023 of file class.ilNewsItem.php.
References $db, $ilDB, $ilUser, $query, $user, ilBlockSetting\_lookup(), getContextObjId(), getContextObjType(), getContextSubObjId(), getContextSubObjType(), ILIAS\Repository\int(), and NEWS_PUBLIC.
Referenced by ilNewsItemGUI\getNewsForContextBlock(), and ilNewsItemGUI\getNewsForContextTable().
ilNewsItem::queryNewsForMultipleContexts | ( | array | $a_contexts, |
bool | $a_for_rss_use = false , |
||
$a_time_period = 0 , |
|||
string | $a_starting_date = "" , |
||
bool | $a_no_auto_generated = false , |
||
int | $a_user_id = null , |
||
int | $a_limit = 0 , |
||
array | $a_exclude = [] |
||
) |
string | int | $a_time_period |
Definition at line 1188 of file class.ilNewsItem.php.
References $db, $ilDB, $ilUser, $query, $type, $user, ilBlockSetting\_lookup(), ILIAS\Repository\int(), and NEWS_PUBLIC.
Referenced by getAggregatedChildNewsData(), and getAggregatedNewsData().
ilNewsItem::read | ( | ) |
Read item from database.
Definition at line 344 of file class.ilNewsItem.php.
References $db, $ilDB, $query, getId(), setContent(), setContentHtml(), setContentIsLangVar(), setContentLong(), setContentTextIsLangVar(), setContentType(), setContextObjId(), setContextObjType(), setContextSubObjId(), setContextSubObjType(), setCreationDate(), setMobDownloadCounter(), setMobId(), setMobPlayCounter(), setPlaytime(), setPriority(), setTitle(), setUpdateDate(), setUpdateUserId(), setUserId(), and setVisibility().
Referenced by __construct().
ilNewsItem::setContent | ( | string | $a_content | ) |
Definition at line 116 of file class.ilNewsItem.php.
Referenced by read().
ilNewsItem::setContentHtml | ( | bool | $a_val | ) |
Definition at line 330 of file class.ilNewsItem.php.
Referenced by read().
ilNewsItem::setContentIsLangVar | ( | bool | $a_content_is_lang_var = false | ) |
Definition at line 253 of file class.ilNewsItem.php.
Referenced by read().
ilNewsItem::setContentLong | ( | string | $a_content_long | ) |
string | $a_content_long | Long content of news |
Definition at line 233 of file class.ilNewsItem.php.
Referenced by read().
ilNewsItem::setContentTextIsLangVar | ( | bool | $a_val = false | ) |
Definition at line 300 of file class.ilNewsItem.php.
Referenced by read().
ilNewsItem::setContentType | ( | string | $a_content_type = "text" | ) |
Definition at line 166 of file class.ilNewsItem.php.
Referenced by read().
ilNewsItem::setContext | ( | int | $a_obj_id, |
string | $a_obj_type, | ||
int | $a_sub_obj_id = 0 , |
||
string | $a_sub_obj_type = "" |
||
) |
Set context for news.
Definition at line 987 of file class.ilNewsItem.php.
References setContextObjId(), setContextObjType(), setContextSubObjId(), and setContextSubObjType().
ilNewsItem::setContextObjId | ( | int | $a_context_obj_id | ) |
Definition at line 126 of file class.ilNewsItem.php.
Referenced by ilNewsItemGUI\getNewsForContextBlock(), ilNewsItemGUI\getNewsForContextTable(), read(), and setContext().
ilNewsItem::setContextObjType | ( | string | $a_context_obj_type | ) |
Definition at line 136 of file class.ilNewsItem.php.
Referenced by ilNewsItemGUI\getNewsForContextBlock(), ilNewsItemGUI\getNewsForContextTable(), read(), and setContext().
ilNewsItem::setContextSubObjId | ( | int | $a_context_sub_obj_id | ) |
Definition at line 146 of file class.ilNewsItem.php.
Referenced by ilNewsItemGUI\getNewsForContextBlock(), ilNewsItemGUI\getNewsForContextTable(), read(), and setContext().
ilNewsItem::setContextSubObjType | ( | ?string | $a_context_sub_obj_type | ) |
Definition at line 156 of file class.ilNewsItem.php.
Referenced by ilNewsItemGUI\getNewsForContextBlock(), ilNewsItemGUI\getNewsForContextTable(), read(), and setContext().
ilNewsItem::setCreationDate | ( | string | $a_creation_date | ) |
Definition at line 176 of file class.ilNewsItem.php.
Referenced by read().
ilNewsItem::setId | ( | int | $a_id | ) |
Definition at line 96 of file class.ilNewsItem.php.
Referenced by __construct(), and create().
ilNewsItem::setLimitation | ( | bool | $a_limitation | ) |
Set Limitation for number of items.
Definition at line 290 of file class.ilNewsItem.php.
ilNewsItem::setMobDownloadCounter | ( | int | $a_val | ) |
Definition at line 320 of file class.ilNewsItem.php.
Referenced by increaseDownloadCounter(), and read().
ilNewsItem::setMobId | ( | int | $a_mob_id | ) |
Definition at line 264 of file class.ilNewsItem.php.
Referenced by read().
ilNewsItem::setMobPlayCounter | ( | int | $a_val | ) |
Definition at line 310 of file class.ilNewsItem.php.
Referenced by increasePlayCounter(), and read().
ilNewsItem::setPlaytime | ( | string | $a_playtime | ) |
string | $a_playtime | Play Time, hh:mm:ss (of attached media file) |
Definition at line 277 of file class.ilNewsItem.php.
Referenced by ilObjMediaCastGUI\determinePlaytimeObject(), and read().
ilNewsItem::setPriority | ( | int | $a_priority = 1 | ) |
Definition at line 243 of file class.ilNewsItem.php.
Referenced by read().
|
static |
Definition at line 1861 of file class.ilNewsItem.php.
Referenced by ilObjectFeedWriter\__construct().
ilNewsItem::setTitle | ( | string | $a_title | ) |
Definition at line 106 of file class.ilNewsItem.php.
Referenced by read(), and ilNewsTimelineGUI\update().
ilNewsItem::setUpdateDate | ( | string | $a_update_date | ) |
Definition at line 186 of file class.ilNewsItem.php.
Referenced by read().
ilNewsItem::setUpdateUserId | ( | int | $a_val | ) |
Definition at line 206 of file class.ilNewsItem.php.
Referenced by read().
ilNewsItem::setUserId | ( | int | $a_user_id | ) |
Definition at line 196 of file class.ilNewsItem.php.
Referenced by read().
ilNewsItem::setVisibility | ( | string | $a_visibility = "users" | ) |
string | $a_visibility | Access level of news. |
Definition at line 219 of file class.ilNewsItem.php.
Referenced by read().
ilNewsItem::update | ( | bool | $a_as_new = false | ) |
Update item in database.
bool | $a_as_new | If true, creation date is set "now" |
Definition at line 457 of file class.ilNewsItem.php.
References $db, $ilDB, getContent(), getContentHtml(), getContentIsLangVar(), getContentLong(), getContentTextIsLangVar(), getContentType(), getContextObjId(), getContextObjType(), getContextSubObjId(), getContextSubObjType(), getId(), getMobDownloadCounter(), getMobId(), getMobPlayCounter(), getPlaytime(), getPriority(), getTitle(), getUpdateUserId(), getUserId(), getVisibility(), ILIAS\Repository\int(), and ilUtil\now().
Referenced by ilNewsData\save().
|
protected |
Definition at line 46 of file class.ilNewsItem.php.
Referenced by getAggregatedChildNewsData(), and getAggregatedNewsData().
|
protected |
Definition at line 53 of file class.ilNewsItem.php.
Referenced by getContent().
|
protected |
Definition at line 54 of file class.ilNewsItem.php.
Referenced by getContentHtml().
|
protected |
Definition at line 67 of file class.ilNewsItem.php.
Referenced by getContentIsLangVar().
|
protected |
Definition at line 65 of file class.ilNewsItem.php.
Referenced by getContentLong().
|
protected |
Definition at line 72 of file class.ilNewsItem.php.
Referenced by getContentTextIsLangVar().
|
protected |
Definition at line 59 of file class.ilNewsItem.php.
Referenced by getContentType().
|
protected |
Definition at line 55 of file class.ilNewsItem.php.
Referenced by getContextObjId().
|
protected |
Definition at line 56 of file class.ilNewsItem.php.
Referenced by getContextObjType().
|
protected |
Definition at line 57 of file class.ilNewsItem.php.
Referenced by getContextSubObjId().
|
protected |
Definition at line 58 of file class.ilNewsItem.php.
Referenced by getContextSubObjType().
|
protected |
Definition at line 60 of file class.ilNewsItem.php.
Referenced by getCreationDate().
|
protected |
Definition at line 50 of file class.ilNewsItem.php.
|
protected |
Definition at line 44 of file class.ilNewsItem.php.
Referenced by checkNewsExistsForObjects(), create(), delete(), increaseDownloadCounter(), increasePlayCounter(), queryNewsForContext(), queryNewsForMultipleContexts(), read(), and update().
|
protected |
Definition at line 51 of file class.ilNewsItem.php.
Referenced by getId(), getLastNewsIdForContext(), and mergeNews().
|
private |
Definition at line 71 of file class.ilNewsItem.php.
Referenced by getLimitation().
|
protected |
Definition at line 49 of file class.ilNewsItem.php.
|
protected |
Definition at line 74 of file class.ilNewsItem.php.
|
private |
Definition at line 73 of file class.ilNewsItem.php.
|
private |
Definition at line 42 of file class.ilNewsItem.php.
Referenced by getMobDownloadCounter().
|
protected |
Definition at line 43 of file class.ilNewsItem.php.
Referenced by getMobPlayCounter().
|
protected |
Definition at line 68 of file class.ilNewsItem.php.
Referenced by getMobId().
|
protected |
Definition at line 47 of file class.ilNewsItem.php.
Referenced by getAggregatedNewsData().
|
protected |
Definition at line 69 of file class.ilNewsItem.php.
Referenced by getPlaytime().
|
protected |
Definition at line 66 of file class.ilNewsItem.php.
Referenced by getPriority().
|
staticprivate |
Definition at line 70 of file class.ilNewsItem.php.
|
protected |
Definition at line 52 of file class.ilNewsItem.php.
Referenced by getTitle().
|
protected |
Definition at line 45 of file class.ilNewsItem.php.
Referenced by getAggregatedChildNewsData(), and getAggregatedNewsData().
|
protected |
Definition at line 61 of file class.ilNewsItem.php.
Referenced by getUpdateDate().
|
protected |
Definition at line 63 of file class.ilNewsItem.php.
Referenced by getUpdateUserId().
|
protected |
Definition at line 48 of file class.ilNewsItem.php.
Referenced by queryNewsForContext(), and queryNewsForMultipleContexts().
|
protected |
Definition at line 62 of file class.ilNewsItem.php.
Referenced by getUserId().
|
protected |
Definition at line 64 of file class.ilNewsItem.php.
Referenced by _getDefaultVisibilityForRefId(), and getVisibility().