5include_once(
"./Services/News/classes/class.ilNewsItem.php");
 
    6include_once(
"./Services/Feeds/classes/class.ilFeedItem.php");
 
    7include_once(
"./Services/Feeds/classes/class.ilFeedWriter.php");
 
   32    public function __construct($a_user_id, $a_hash, $privFeed = 
false)
 
   37        $this->lng = 
$DIC->language();
 
   41        parent::__construct();
 
   45        if ($a_user_id == 
"" || $a_hash == 
"") {
 
   50        if (!$news_set->get(
"enable_rss_for_internal")) {
 
   54        include_once 
"Services/User/classes/class.ilObjUser.php";
 
   57        include_once(
"./Services/News/classes/class.ilNewsItem.php");
 
   60        if ($a_hash == $hash) {
 
   68            if (
$ilSetting->get(
'short_inst_name') != 
"") {
 
   78            foreach (
$items as $item) {
 
   84                if ($obj_type == 
"mcst") {
 
   85                    include_once(
"./Modules/MediaCast/classes/class.ilObjMediaCastAccess.php");
 
   94                    $item[
"context_obj_type"],
 
   96                    $item[
"content_is_lang_var"],
 
  105                if ($news_set->get(
"rss_title_format") == 
"news_obj") {
 
  106                    $feed_item->setTitle($this->
prepareStr(str_replace(
"<br />", 
" ", 
$title)) .
 
  118                $feed_item->setDescription($content);
 
  121                if (in_array($item[
"context_obj_type"], array(
"lm")) && $item[
"context_sub_obj_type"] == 
"pg" 
  122                    && $item[
"context_sub_obj_id"] > 0) {
 
  123                    $feed_item->setLink(ILIAS_HTTP_PATH . 
"/goto.php?client_id=" . CLIENT_ID .
 
  124                        "&target=pg_" . $item[
"context_sub_obj_id"] . 
"_" . $item[
"ref_id"]);
 
  125                } elseif ($item[
"context_obj_type"] == 
"wiki" && $item[
"context_sub_obj_type"] == 
"wpg" 
  126                    && $item[
"context_sub_obj_id"] > 0) {
 
  127                    include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
 
  129                    $feed_item->setLink(ILIAS_HTTP_PATH . 
"/goto.php?client_id=" . CLIENT_ID .
 
  130                        "&target=" . $item[
"context_obj_type"] . 
"_" . $item[
"ref_id"] . 
"_" . urlencode($wptitle)); 
 
  131                } elseif (in_array($item[
"context_obj_type"], array(
"frm")) && $item[
"context_sub_obj_type"] == 
"pos" 
  132                    && $item[
"context_sub_obj_id"] > 0) {
 
  134                    include_once(
"./Modules/Forum/classes/class.ilObjForumAccess.php");
 
  136                    if ($thread_id > 0) {
 
  137                        $feed_item->setLink(ILIAS_HTTP_PATH . 
"/goto.php?client_id=" . CLIENT_ID .
 
  138                            "&target=" . $item[
"context_obj_type"] . 
"_" . $item[
"ref_id"] . 
"_" . $thread_id . 
"_" . $item[
"context_sub_obj_id"]);
 
  140                        $feed_item->setLink(ILIAS_HTTP_PATH . 
"/goto.php?client_id=" . CLIENT_ID .
 
  141                            "&target=" . $item[
"context_obj_type"] . 
"_" . $item[
"ref_id"]);
 
  144                    $feed_item->setLink(ILIAS_HTTP_PATH . 
"/goto.php?client_id=" . CLIENT_ID .
 
  145                        "&target=" . $item[
"context_obj_type"] . 
"_" . $item[
"ref_id"]);
 
  147                $feed_item->setAbout($feed_item->getLink() . 
"&il_about_feed=" . $item[
"id"]);
 
  148                $feed_item->setDate($item[
"creation_date"]);
 
An exception for terminatinating execution or to throw for unit testing.
A FeedItem represents an item in a News Feed.
addItem($a_item)
Add Item Item is an object of type ilFeedItem.
setChannelLink($a_link)
Channel Link URL to which an HTML rendering of the channel title will link.
setChannelAbout($a_ab)
Unique URI that defines the channel.
getContextPath($a_ref_id)
setChannelTitle($a_title)
Channel Title.
static _lookupRSSPeriod()
static determineNewsContent($a_context_obj_type, $a_content, $a_is_lang_var)
Determine new content.
static _getNewsItemsOfUser( $a_user_id, $a_only_public=false, $a_prevent_aggregation=false, $a_per=0, &$a_cnt=null)
Get all news items for a user.
static determineNewsTitle( $a_context_obj_type, $a_title, $a_content_is_lang_var, $a_agg_ref_id=0, $a_aggregation="")
Determine title for news item entry.
static _getThreadForPosting($a_pos_id)
Get thread id for posting.
static _lookupFeedHash($a_user_id, $a_create=false)
Lookup news feed hash for user.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
Feed writer for personal user feeds.
__construct($a_user_id, $a_hash, $privFeed=false)
static lookupTitle($a_page_id)
Checks whether a page with given title exists.