5 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
45 $this->ctrl = $DIC->ctrl();
46 $this->lng = $DIC->language();
47 $this->
user = $DIC->user();
48 $this->help = $DIC[
"ilHelp"];
49 $this->access = $DIC->access();
51 $this->tabs = $DIC->tabs();
53 $lng = $DIC->language();
55 $ilHelp = $DIC[
"ilHelp"];
57 parent::__construct();
59 $lng->loadLanguageModule(
"news");
60 $ilHelp->addHelpSection(
"news_block");
62 include_once(
"./Services/News/classes/class.ilNewsItem.php");
68 $this->dynamic =
false;
69 include_once(
"./Services/News/classes/class.ilNewsCache.php");
71 $cres = unserialize($this->acache->getEntry(
$ilUser->getId() .
":" .
$_GET[
"ref_id"]));
72 $this->cache_hit =
false;
74 if ($this->acache->getLastAccessStatus() ==
"hit" && is_array($cres)) {
76 $this->cache_hit =
true;
78 if ($this->
getDynamic() && !$this->cache_hit) {
79 $this->dynamic =
true;
82 if (!empty(self::$st_data)) {
83 $data = self::$st_data;
86 self::$st_data =
$data;
93 $this->
setRowTemplate(
"tpl.block_row_news_for_context.html",
"Services/News");
95 $this->allow_moving =
false;
107 include_once(
"./Services/News/classes/class.ilNewsCache.php");
117 $news_item->setContextObjId(
$ilCtrl->getContextObjId());
118 $news_item->setContextObjType(
$ilCtrl->getContextObjType());
122 $prevent_aggregation =
true;
123 if (
$ilCtrl->getContextObjType() !=
"frm") {
124 $forum_grouping =
true;
126 $forum_grouping =
false;
130 $news_data = $news_item->getNewsForRefId(
135 $prevent_aggregation,
139 $this->acache->storeEntry(
141 serialize($news_data)
156 return self::$block_type;
178 if (
$ilCtrl->getCmdClass() ==
"ilnewsitemgui") {
206 $next_class =
$ilCtrl->getNextClass();
207 $cmd =
$ilCtrl->getCmd(
"getHTML");
209 switch ($next_class) {
210 case "ilnewsitemgui":
211 include_once(
"./Services/News/classes/class.ilNewsItemGUI.php");
218 return $this->$cmd();
229 $this->enable_edit = $a_enable_edit;
239 return $this->enable_edit;
247 if ($this->dynamic) {
250 parent::fillDataSection();
266 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
289 if ($enable_internal_rss) {
290 include_once(
"./Services/News/classes/class.ilRSSButtonGUI.php");
292 ILIAS_HTTP_PATH .
"/feed.php?client_id=" . rawurlencode(CLIENT_ID) .
"&" .
293 "ref_id=" .
$_GET[
"ref_id"],
294 $lng->txt(
"news_feed_url"),
324 $ilCtrl->getLinkTargetByClass(
"ilnewsitemgui",
"editNews"),
328 $ilCtrl->setParameter($this,
"add_mode",
"block");
330 $ilCtrl->getLinkTargetByClass(
"ilnewsitemgui",
"createNewsItem"),
333 $ilCtrl->setParameter($this,
"add_mode",
"");
338 $ilCtrl->getLinkTarget($this,
"editSettings"),
339 $lng->txt(
"settings")
359 && (!$news_set->get(
"enable_rss_for_internal") ||
370 if (
$ilUser->getPref(
"il_feed_js") ==
"n") {
374 return parent::getHTML() . $en;
384 include_once(
"Services/Block/classes/class.ilBlockSetting.php");
393 $got_notices = $got_messages =
false;
395 if ($row[
"priority"] == 0) {
398 if ($row[
"priority"] == 1) {
399 $got_messages =
true;
402 $this->show_view_selection =
false;
404 if ($got_notices && $got_messages) {
405 $this->show_view_selection =
true;
406 } elseif ($got_notices) {
436 $this->tpl->setCurrentBlock(
"long");
438 $this->tpl->setVariable(
442 $this->tpl->parseCurrentBlock();
446 if ($news[
"ref_id"] > 0) {
447 if ($news[
"agg_ref_id"] > 0) {
450 $context_ref = $news[
"agg_ref_id"];
452 $obj_id = $news[
"context_obj_id"];
453 $type = $news[
"context_obj_type"];
454 $context_ref = $news[
"ref_id"];
457 $lang_type = in_array(
$type,
array(
"sahs",
"lm",
"htlm"))
461 $this->tpl->setCurrentBlock(
"news_context");
462 $this->tpl->setVariable(
"TYPE",
$lng->txt($lang_type));
463 $this->tpl->setVariable(
467 $this->tpl->setVariable(
471 if ($news[
"user_read"] > 0) {
472 $this->tpl->setVariable(
"TITLE_CLASS",
'class="light"');
475 $this->tpl->parseCurrentBlock();
476 $ilCtrl->setParameter($this,
"news_context", $context_ref);
478 $ilCtrl->setParameter($this,
"news_context",
"");
482 $this->tpl->setVariable(
485 $news[
"context_obj_type"],
487 $news[
"content_is_lang_var"],
494 if ($news[
"user_read"] > 0) {
495 $this->tpl->setVariable(
"A_CLASS",
'class="light"');
498 $ilCtrl->setParameter($this,
"news_id", $news[
"id"]);
499 $this->tpl->setVariable(
501 $ilCtrl->getLinkTarget($this,
"showNews")
503 $ilCtrl->clearParameters($this);
515 return '<div class="small">' . ((int) count($this->
getData())) .
" " .
$lng->txt(
"news_news_items") .
"</div>";
529 if (empty(self::$st_data)) {
534 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
536 include_once(
"./Services/News/classes/class.ilNewsItem.php");
539 $tpl =
new ilTemplate(
"tpl.show_news.html",
true,
true,
"Services/News");
542 $previous = $next =
"";
544 $c = current($this->
data);
547 while ($c[
"id"] > 0 &&
548 $c[
"id"] != $_GET[
"news_id"]) {
550 $c = next($this->
data);
554 if (!is_array($c) && is_object($news) && $news->getId() > 0
556 throw new ilException(
"News ID does not match object context.");
561 $news_list =
array();
562 if (is_array($c[
"aggregation"])) {
563 $news_list[] =
array(
"ref_id" => $c[
"agg_ref_id"],
564 "agg_ref_id" => $c[
"agg_ref_id"],
565 "aggregation" => $c[
"aggregation"],
567 "content_type" =>
"text",
571 "content_long" =>
"",
572 "update_date" => $news->getUpdateDate(),
573 "creation_date" =>
"",
574 "content_is_lang_var" =>
false,
575 "loc_context" => $_GET[
"news_context"],
576 "context_obj_type" => $news->getContextObjType(),
579 foreach ($c[
"aggregation"] as $c_item) {
581 $c_item[
"loc_context"] = $c_item[
"ref_id"];
582 $c_item[
"loc_stop"] = $_GET[
"news_context"];
583 $news_list[] = $c_item;
586 $news_list[] =
array(
587 "id" => $news->getId(),
588 "ref_id" => $_GET[
"news_context"],
589 "user_id" => $news->getUserId(),
590 "content_type" => $news->getContentType(),
591 "mob_id" => $news->getMobId(),
592 "visibility" => $news->getVisibility(),
593 "priority" => $news->getPriority(),
594 "content" => $news->getContent(),
595 "content_long" => $news->getContentLong(),
596 "update_date" => $news->getUpdateDate(),
597 "creation_date" => $news->getCreationDate(),
598 "context_sub_obj_type" => $news->getContextSubObjType(),
599 "context_obj_type" => $news->getContextObjType(),
600 "context_sub_obj_id" => $news->getContextSubObjId(),
601 "content_is_lang_var" => $news->getContentIsLangVar(),
602 "content_text_is_lang_var" => $news->getContentTextIsLangVar(),
603 "loc_context" => $_GET[
"news_context"],
604 "title" => $news->getTitle());
609 $cache_deleted =
false;
610 foreach ($news_list as $item) {
611 $row_css = ($row_css !=
"tblrow1")
615 if ($item[
"ref_id"] > 0 && !$ilAccess->checkAccess(
"read",
"", $item[
"ref_id"])) {
616 $tpl->setCurrentBlock(
"content");
617 $tpl->setVariable(
"VAL_CONTENT",
$lng->txt(
"news_sorry_not_accessible_anymore"));
618 $tpl->parseCurrentBlock();
619 $tpl->setCurrentBlock(
"item");
620 $tpl->setVariable(
"ITEM_ROW_CSS", $row_css);
621 $tpl->parseCurrentBlock();
622 if (!$cache_deleted) {
623 $this->acache->deleteEntry(
$ilUser->getId() .
":" . $_GET[
"ref_id"]);
624 $cache_deleted =
true;
634 $displayname =
$user->getLogin();
638 $displayname =
"<" . strtolower(
$lng->txt(
"deleted")) .
">";
641 $tpl->setCurrentBlock(
"user_info");
642 $tpl->setVariable(
"VAL_AUTHOR", $displayname);
643 $tpl->setVariable(
"TXT_AUTHOR",
$lng->txt(
"author"));
644 $tpl->parseCurrentBlock();
650 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
651 include_once(
"./Services/MediaObjects/classes/class.ilMediaPlayerGUI.php");
653 $med = $mob->getMediaItem(
"Standard");
655 if (strcasecmp(
"Reference", $med->getLocationType()) == 0) {
656 $mpl->setFile($med->getLocation());
660 $mpl->setDisplayHeight($med->getHeight());
661 $tpl->setCurrentBlock(
"player");
664 $mpl->getMp3PlayerHtml()
666 $tpl->parseCurrentBlock();
670 if ($enable_internal_rss && $item[
"visibility"] !=
"") {
672 $tpl->setCurrentBlock(
"access");
673 $tpl->setVariable(
"TXT_ACCESS",
$lng->txt(
"news_news_item_visibility"));
675 ($item[
"priority"] == 0 &&
678 "public_notifications",
682 $tpl->setVariable(
"VAL_ACCESS",
$lng->txt(
"news_visibility_public"));
684 $tpl->setVariable(
"VAL_ACCESS",
$lng->txt(
"news_visibility_users"));
686 $tpl->parseCurrentBlock();
690 include_once(
"./Services/News/classes/class.ilNewsRendererFactory.php");
692 if (trim($item[
"content"]) !=
"") {
694 $renderer->setNewsItem($it, $item[
"ref_id"]);
695 $tpl->setCurrentBlock(
"content");
696 $tpl->setVariable(
"VAL_CONTENT", $renderer->getDetailContent());
697 $tpl->parseCurrentBlock();
699 if ($item[
"update_date"] != $item[
"creation_date"]) {
700 $tpl->setCurrentBlock(
"ni_update");
701 $tpl->setVariable(
"TXT_LAST_UPDATE",
$lng->txt(
"last_update"));
706 $tpl->parseCurrentBlock();
710 if ($item[
"creation_date"] !=
"") {
711 $tpl->setCurrentBlock(
"ni_update");
716 $tpl->setVariable(
"TXT_CREATED",
$lng->txt(
"created"));
717 $tpl->parseCurrentBlock();
722 if ($_GET[
"news_context"] > 0) {
729 if ($obj_type ==
"file") {
730 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $item[
"ref_id"]);
731 $url =
$ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"sendfile");
732 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $_GET[
"ref_id"]);
734 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
736 $button->setUrl(
$url);
737 $button->setCaption(
"download");
739 $tpl->setCurrentBlock(
"download");
740 $tpl->setVariable(
"BUTTON_DOWNLOAD", $button->render());
741 $tpl->parseCurrentBlock();
746 if ($obj_type ==
"frm" && $item[
"context_sub_obj_type"] ==
"pos" 747 && $item[
"context_sub_obj_id"] > 0) {
748 include_once(
"./Modules/Forum/classes/class.ilObjForumAccess.php");
749 $pos = $item[
"context_sub_obj_id"];
752 $add =
"_" . $thread .
"_" . $pos;
757 if ($obj_type ==
"wiki" && $item[
"context_sub_obj_type"] ==
"wpg" 758 && $item[
"context_sub_obj_id"] > 0) {
759 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
761 if ($wptitle !=
"") {
766 $url_target =
"./goto.php?client_id=" . rawurlencode(CLIENT_ID) .
"&target=" .
767 $obj_type .
"_" . $item[
"ref_id"] . $add;
770 if (in_array($obj_type,
array(
"lm")) && $item[
"context_sub_obj_type"] ==
"pg" 771 && $item[
"context_sub_obj_id"] > 0) {
772 $url_target =
"./goto.php?client_id=" . rawurlencode(CLIENT_ID) .
"&target=" .
773 "pg_" . $item[
"context_sub_obj_id"] .
"_" . $item[
"ref_id"];
777 if ($obj_type ==
"blog" && $item[
"context_sub_obj_type"] ==
"blp" 778 && $item[
"context_sub_obj_id"] > 0) {
779 $url_target =
"./goto.php?client_id=" . rawurlencode(CLIENT_ID) .
"&target=" .
780 "blog_" . $item[
"ref_id"] .
"_" . $item[
"context_sub_obj_id"];
783 $context_opened =
false;
784 if ($item[
"loc_context"] != null && $item[
"loc_context"] != $item[
"loc_stop"]) {
785 $tpl->setCurrentBlock(
"context");
786 $context_opened =
true;
788 $cont_loc->addContextItems($item[
"loc_context"],
true, $item[
"loc_stop"]);
789 $tpl->setVariable(
"CONTEXT_LOCATOR", $cont_loc->getHTML());
793 if ($item[
"no_context_title"] !==
true) {
794 if (!$context_opened) {
795 $tpl->setCurrentBlock(
"context");
797 $tpl->setVariable(
"HREF_CONTEXT_TITLE", $url_target);
798 $tpl->setVariable(
"CONTEXT_TITLE", $obj_title);
801 if ($context_opened) {
802 $tpl->parseCurrentBlock();
805 $tpl->setVariable(
"HREF_TITLE", $url_target);
812 $item[
"context_obj_type"],
814 $item[
"content_is_lang_var"],
821 $tpl->setCurrentBlock(
"item");
822 $tpl->setVariable(
"ITEM_ROW_CSS", $row_css);
823 $tpl->parseCurrentBlock();
826 include_once(
"./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
828 $content_block->setContent(
$tpl->get());
830 $content_block->setTitle($this->
getProperty(
"title"));
832 $content_block->setTitle(
$lng->txt(
"news_internal_news"));
837 if ($previous !=
"") {
838 if ($previous[
"ref_id"] > 0) {
839 $ilCtrl->setParameter($this,
"news_context", $previous[
"ref_id"]);
841 $ilCtrl->setParameter($this,
"news_id", $previous[
"id"]);
842 $content_block->addFooterLink(
843 $lng->txt(
"previous"),
844 $ilCtrl->getLinkTarget($this,
"showNews"),
849 $ilCtrl->setParameter($this,
"news_context",
"");
853 if ($c = next($this->
data)) {
854 if ($c[
"ref_id"] > 0) {
855 $ilCtrl->setParameter($this,
"news_context", $c[
"ref_id"]);
857 $ilCtrl->setParameter($this,
"news_id", $c[
"id"]);
858 $content_block->addFooterLink(
860 $ilCtrl->getLinkTarget($this,
"showNews"),
866 $ilCtrl->setParameter($this,
"news_context",
"");
867 $ilCtrl->setParameter($this,
"news_id",
"");
868 $content_block->setCurrentItemNumber($curr_cnt);
869 $content_block->setEnableNumInfo(
true);
870 $content_block->setData($this->
getData());
872 return $content_block->getHTML();
885 if (is_int(strpos($a_str,
">")) && is_int(strpos($a_str,
"<"))) {
901 include_once(
"./Services/News/classes/class.ilNewsSubscription.php");
903 $ilCtrl->returnToParent($this);
914 include_once(
"./Services/News/classes/class.ilNewsSubscription.php");
916 $ilCtrl->returnToParent($this);
928 parent::fillFooter();
930 if ($this->show_view_selection) {
947 $this->
addFooterLink(
"[" .
$lng->txt(
"news_first_letter_of_word_notification") .
"] " .
948 $lng->txt(
"news_notifications") .
": ",
"",
"",
"",
false,
true);
949 if ($this->view ==
"hide_notifications") {
991 include_once(
"Services/Block/classes/class.ilBlockSetting.php");
1009 $ilCtrl->returnToParent($this);
1018 include_once(
"Services/Block/classes/class.ilBlockSetting.php");
1022 "hide_notifications",
1036 $ilCtrl->returnToParent($this);
1046 return $this->settings_form->getHTML();
1060 $ilTabs->clearTargets();
1063 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1067 "public_notifications",
1085 "hide_news_per_date",
1096 if ($hide_news_date !=
"") {
1097 $hide_news_date = explode(
" ", $hide_news_date);
1100 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1102 $this->settings_form->setTitle(
$lng->txt(
"news_settings"));
1105 if ($this->
getProperty(
"hide_news_block_option")) {
1107 $lng->txt(
"news_hide_news_block"),
1110 $ch->
setInfo(
$lng->txt(
"news_hide_news_block_info"));
1111 $ch->setChecked($hide_block);
1112 $this->settings_form->addItem($ch);
1115 $lng->txt(
"news_hide_news_per_date"),
1116 "hide_news_per_date" 1118 $hnpd->
setInfo(
$lng->txt(
"news_hide_news_per_date_info"));
1119 $hnpd->setChecked($hide_news_per_date);
1122 $lng->txt(
"news_hide_news_date"),
1126 if ($hide_news_date !=
"") {
1129 #$dt_prop->setDate($hide_news_date[0]); 1130 #$dt_prop->setTime($hide_news_date[1]); 1131 $dt_prop->setShowTime(
true);
1133 $hnpd->addSubItem($dt_prop);
1135 $this->settings_form->addItem($hnpd);
1139 if ($this->
getProperty(
"default_visibility_option") &&
1140 $enable_internal_rss) {
1143 "default_visibility",
1147 if ($default_visibility ==
"") {
1148 $default_visibility =
1155 $radio_group->addOption($radio_option);
1156 $radio_option =
new ilRadioOption(
$lng->txt(
"news_visibility_public"),
"public");
1157 $radio_group->addOption($radio_option);
1158 $radio_group->
setInfo(
$lng->txt(
"news_news_item_visibility_info"));
1159 $radio_group->setRequired(
false);
1160 $radio_group->setValue($default_visibility);
1161 $this->settings_form->addItem($radio_group);
1165 if ($this->
getProperty(
"public_notifications_option") &&
1166 $enable_internal_rss) {
1168 $lng->txt(
"news_notifications_public"),
1169 "notifications_public" 1171 $ch->
setInfo(
$lng->txt(
"news_notifications_public_info"));
1172 $ch->setChecked($public);
1173 $this->settings_form->addItem($ch);
1177 if ($enable_internal_rss) {
1179 $lng->txt(
"news_public_feed"),
1180 "notifications_public_feed" 1183 $ch->setChecked($public_feed);
1184 $this->settings_form->addItem($ch);
1195 $this->settings_form->addCommandButton(
"saveSettings",
$lng->txt(
"save"));
1196 $this->settings_form->addCommandButton(
"cancelSettings",
$lng->txt(
"cancel"));
1197 $this->settings_form->setFormAction(
$ilCtrl->getFormaction($this));
1207 $ilCtrl->returnToParent($this);
1220 if ($this->settings_form->checkInput()) {
1222 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1224 if ($enable_internal_rss) {
1227 "public_notifications",
1228 $_POST[
"notifications_public"],
1235 $_POST[
"notifications_public_feed"],
1241 "default_visibility",
1242 $_POST[
"default_visibility"],
1248 if ($this->
getProperty(
"hide_news_block_option")) {
1252 $_POST[
"hide_news_block"],
1258 "hide_news_per_date",
1259 $_POST[
"hide_news_per_date"],
1265 $hd = $this->settings_form->getItemByPostVar(
"hide_news_date");
1266 $hide_date = $hd->getDate();
1267 if (
$_POST[
"hide_news_per_date"] && $hide_date != null) {
1286 include_once(
"./Services/News/classes/class.ilNewsCache.php");
1288 $cache->deleteEntry(
$ilUser->getId() .
":" .
$_GET[
"ref_id"]);
1290 $ilCtrl->returnToParent($this);
1292 $this->settings_form->setValuesByPost();
1293 return $this->settings_form->getHtml();
1306 include_once(
"./Services/News/classes/class.ilNewsItem.php");
1310 $tpl =
new ilTemplate(
"tpl.show_feed_url.html",
true,
true,
"Services/News");
1313 sprintf(
$lng->txt(
"news_feed_url_for"),
$title)
1315 $tpl->setVariable(
"TXT_INFO",
$lng->txt(
"news_get_feed_info"));
1316 $tpl->setVariable(
"TXT_FEED_URL",
$lng->txt(
"news_feed_url"));
1319 ILIAS_HTTP_PATH .
"/feed.php?client_id=" . rawurlencode(CLIENT_ID) .
"&user_id=" .
$ilUser->getId() .
1320 "&obj_id=" . $this->block_id .
1325 ILIAS_HTTP_PATH .
"/feed.php?client_id=" . rawurlencode(CLIENT_ID) .
"&<br />user_id=" .
$ilUser->getId() .
1326 "&obj_id=" . $this->block_id .
1330 include_once(
"./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
1332 $content_block->setContent(
$tpl->get());
1333 $content_block->setTitle(
$lng->txt(
"news_internal_news"));
1334 $content_block->addHeaderCommand(
1335 $ilCtrl->getParentReturn($this),
1340 return $content_block->getHTML();
1348 $a_content_block->addHeaderCommand(
1349 $ilCtrl->getParentReturn($this),
1360 if (
$ilCtrl->getCmd() ==
"hideNotifications" ||
1361 $ilCtrl->getCmd() ==
"showNotifications") {
1365 if (
$ilCtrl->getCmdClass() !=
"ilcolumngui" &&
$ilCtrl->getCmd() !=
"enableJS") {
1368 $sess_feed_js =
$_SESSION[
"il_feed_js"];
1371 if ($sess_feed_js !=
"n" &&
1372 (
$ilUser->getPref(
"il_feed_js") !=
"n" || $sess_feed_js ==
"y")) {
1395 $rel_tpl =
new ilTemplate(
"tpl.dynamic_reload.html",
true,
true,
"Services/News");
1396 $rel_tpl->setVariable(
"TXT_LOADING",
$lng->txt(
"news_loading_news"));
1398 $rel_tpl->setVariable(
1400 $ilCtrl->getLinkTargetByClass(
"ilcolumngui",
"updateBlock",
"",
true)
1404 $rel_tpl->setVariable(
"TXT_NEWS_CLICK_HERE",
$lng->txt(
"news_no_js_click_here"));
1405 $rel_tpl->setVariable(
1407 $ilCtrl->getLinkTargetByClass(strtolower(get_class($this)),
"disableJS")
1410 return $rel_tpl->get();
1424 $rel_tpl =
new ilTemplate(
"tpl.js_enabler.html",
true,
true,
"Services/News");
1426 $rel_tpl->setVariable(
1428 $ilCtrl->getLinkTargetByClass(strtolower(get_class($this)),
"enableJS",
true,
"",
false)
1431 return $rel_tpl->get();
1441 $ilUser->writePref(
"il_feed_js",
"n");
1442 $ilCtrl->returnToParent($this);
1451 $ilUser->writePref(
"il_feed_js",
"y");
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
clearFooterLinks()
Clear footer links.
This class represents an option in a radio group.
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
static shortenWords($a_str, $a_len=30, $a_dots=true)
Ensure that the maximum word lenght within a text is not longer than $a_len.
executeCommand()
execute command
static _write($a_type, $a_setting, $a_value, $a_user=0, $a_block_id=0)
Write setting to database.
static _getThreadForPosting($a_pos_id)
Get thread id for posting.
getOverview()
Get overview.
setEnableEdit($a_enable_edit=0)
Set EnableEdit.
handleView()
Handles show/hide notification view and removes notifications if hidden.
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
setFooterInfo($a_footerinfo, $a_hide_and_icon=false)
Set Footer Info.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
User Interface for NewsItem entities.
fillFooterLinks($a_top=false, $a_numinfo="")
Fill footer links.
static _lookupTitle($a_id)
lookup object title
editSettings()
Show settings screen.
getHTML()
Get bloch HTML code.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
BlockGUI class for block NewsForContext.
getRepositoryMode()
Get RepositoryMode.
static prepareNewsDataFromCache($a_cres)
Prepare news data from cache.
setInfo($a_info)
Set Info.
makeClickable($a_str)
Make clickable.
static _unsubscribe($a_ref_id, $a_user_id)
Unsubscribe a user from an object (ref id).
fillDataSection()
Fill data section.
addFooterLink( $a_text, $a_href="", $a_onclick="", $a_block_id="", $a_top=false, $a_omit_separator=false, $a_checked=false)
Add a footer text/link.
fillRow($news)
get flat bookmark list for personal desktop
subscribeNews()
Subscribe current user from news.
setTitle($a_title)
Set Title.
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
static _setRead($a_user_id, $a_news_id)
Set item read.
setBlockId($a_block_id=0)
Set Block Id.
setData($a_data)
Set Data.
static _lookupObjId($a_id)
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
special template class to simplify handling of ITX/PEAR
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
static _lookup($a_type, $a_setting, $a_user=0, $a_block_id=0)
Lookup setting from database.
showFeedUrl()
Show feed URL.
__construct()
Constructor.
initSettingsForm()
Init setting form.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
saveSettings()
Save settings.
getBlockId()
Get Block Id.
unsubscribeNews()
Unsubscribe current user from news.
addCloseCommand($a_content_block)
addBlockCommand( $a_href, $a_text, $a_target="", $a_img="", $a_right_aligned=false, $a_checked=false, $a_html="")
Add Block Command.
showViewFooter()
Show additional footer for show/hide notifications.
setLimit($a_limit)
Set Limit.
getEnableEdit()
Get EnableEdit.
static _subscribe($a_ref_id, $a_user_id)
Subscribe a user to an object (ref id).
static getRenderer($a_context_obj_type)
Get renderer.
static _lookupFeedHash($a_user_id, $a_create=false)
Lookup news feed hash for user.
static _getDefaultVisibilityForRefId($a_ref_id)
Get default visibility for reference id.
static _lookupContextObjId($a_news_id)
Context Object ID.
getNewsData()
Get news for context.
static isRepositoryObject()
Is this a repository object.
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.
This class represents a block method of a block.
static getScreenMode()
Get Screen Mode for current command.
cancelSettings()
Cancel settings.
BlockGUI class for (centered) Content on Personal Desktop.
static getBlockType()
Get block type.
setRowTemplate($a_rowtemplatename, $a_rowtemplatedir="")
Set Row Template Name.
getCurrentDetailLevel()
Get Current Detail Level.