58 $this->
ctrl = $DIC->ctrl();
59 $this->
lng = $DIC->language();
60 $this->
user = $DIC->user();
61 $this->
help = $DIC[
"ilHelp"];
62 $this->
access = $DIC->access();
64 $this->
tabs = $DIC->tabs();
65 $this->obj_definition = $DIC[
"objDefinition"];
71 $this->news_access =
new NewsAccess($this->std_request->getRefId());
73 $ilCtrl = $DIC->ctrl();
74 $lng = $DIC->language();
76 $ilHelp = $DIC[
"ilHelp"];
81 $ilHelp->addHelpSection(
"news_block");
83 $this->
setBlockId((
string) $ilCtrl->getContextObjId());
87 $this->dynamic =
false;
90 $this->acache->getEntry(
$ilUser->getId() .
":" . $this->std_request->getRefId()),
91 [
"allowed_classes" =>
false]
93 $this->cache_hit =
false;
95 if ($this->acache->getLastAccessStatus() ===
"hit" && is_array($cres)) {
97 $this->cache_hit =
true;
99 if ($this->
getDynamic() && !$this->cache_hit) {
100 $this->dynamic =
true;
102 } elseif (!empty(self::$st_data)) {
103 $data = self::$st_data;
106 self::$st_data =
$data;
110 $this->
setRowTemplate(
"tpl.block_row_news_for_context.html",
"Services/News");
112 $this->allow_moving =
false;
132 $news_item->setContextObjId($ilCtrl->getContextObjId());
133 $news_item->setContextObjType($ilCtrl->getContextObjType());
137 $prevent_aggregation =
true;
138 if ($ilCtrl->getContextObjType() !==
"frm") {
139 $forum_grouping =
true;
141 $forum_grouping =
false;
145 $news_data = $news_item->getNewsForRefId(
146 $this->std_request->getRefId(),
150 $prevent_aggregation,
154 $this->acache->storeEntry(
155 $ilUser->getId() .
":" . $this->std_request->getRefId(),
156 serialize($news_data)
166 return self::$block_type;
178 $ilCtrl = $DIC->ctrl();
180 if (strtolower($ilCtrl->getCmdClass()) ===
"ilnewsitemgui") {
184 switch ($ilCtrl->getCmd()) {
203 $cmd = $ilCtrl->getCmd(
"getHTML");
205 switch ($next_class) {
206 case "ilnewsitemgui":
209 $html = $ilCtrl->forwardCommand($news_item_gui);
213 return $this->$cmd();
219 if ($this->dynamic) {
221 } elseif (count($this->
getData()) > 0) {
222 parent::fillDataSection();
237 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
243 (
int) $this->block_id
254 (
int) $this->block_id
256 if ($public_feed && $enable_internal_rss) {
259 ILIAS_HTTP_PATH .
"/feed.php?client_id=" . rawurlencode(
CLIENT_ID) .
"&" .
260 "ref_id=" . $this->std_request->getRefId(),
266 if ($this->news_access->canAdd()) {
268 $ilCtrl->getLinkTargetByClass(
"ilnewsitemgui",
"editNews"),
272 $ilCtrl->setParameter($this,
"add_mode",
"block");
274 $ilCtrl->getLinkTargetByClass(
"ilnewsitemgui",
"createNewsItem"),
277 $ilCtrl->setParameter($this,
"add_mode",
"");
281 $ref_id = $this->std_request->getRefId();
286 $parent_gui =
"ilobj" . $obj_class .
"gui";
288 $ilCtrl->setParameterByClass(
"ilcontainernewssettingsgui",
"ref_id",
$ref_id);
290 if (in_array($obj_class, self::OBJECTS_WITH_NEWS_SUBTAB)) {
292 $ilCtrl->getLinkTargetByClass([
"ilrepositorygui", $parent_gui,
"ilcontainernewssettingsgui"],
"show"),
302 $ilCtrl->getLinkTarget($this,
"editSettings"),
315 (
int) $this->block_id
324 !$news_set->get(
"enable_rss_for_internal") ||
329 (
int) $this->block_id
337 return parent::getHTML() . $en;
351 (
int) $this->block_id
355 $got_notices = $got_messages =
false;
356 foreach ($this->data as $row) {
357 if ((
int) ($row[
"priority"] ?? 0) === 0) {
360 if ((
int) ($row[
"priority"] ?? 0) === 1) {
361 $got_messages =
true;
364 $this->show_view_selection =
false;
366 if ($got_notices && $got_messages) {
367 $this->show_view_selection =
true;
368 } elseif ($got_notices) {
380 $this->tpl->setCurrentBlock(
"long");
381 $this->tpl->setVariable(
"VAL_CREATION_DATE", $info[
"creation_date"]);
382 $this->tpl->parseCurrentBlock();
384 if ($info[
"ref_id"] > 0) {
385 $this->tpl->setCurrentBlock(
"news_context");
386 $this->tpl->setVariable(
"TYPE", $info[
"type_txt"]);
387 $this->tpl->setVariable(
"IMG_TYPE", $info[
"type_icon"]);
388 $this->tpl->setVariable(
"TITLE", $info[
"obj_title"]);
389 if ($info[
"user_read"] > 0) {
390 $this->tpl->setVariable(
"TITLE_CLASS",
'class="light"');
393 $this->tpl->parseCurrentBlock();
397 $this->tpl->setVariable(
"VAL_TITLE", $info[
"news_title"]);
399 if ($info[
"user_read"] > 0) {
400 $this->tpl->setVariable(
"A_CLASS",
'class="light"');
403 $this->tpl->setVariable(
"HREF_SHOW", $info[
"url"]);
414 $info[
"ref_id"] = $news[
"ref_id"] ?? 0;
415 $info[
"creation_date"] =
419 if (($news[
"ref_id"] ?? 0) > 0) {
420 if (isset($news[
"agg_ref_id"]) && $news[
"agg_ref_id"] > 0) {
423 $context_ref = $news[
"agg_ref_id"];
425 $obj_id = $news[
"context_obj_id"];
426 $type = $news[
"context_obj_type"];
427 $context_ref = $news[
"ref_id"];
430 $lang_type = in_array(
$type, [
"sahs",
"lm",
"htlm"])
434 $type_txt = ($obj_definition->
isPlugin($news[
"context_obj_type"]))
439 $info[
"type_txt"] = $type_txt;
442 $info[
"user_read"] = $news[
"user_read"];
444 $ilCtrl->setParameter($this,
"news_context", $context_ref);
446 $ilCtrl->setParameter($this,
"news_context",
"");
450 $info[
"news_title"] =
453 $news[
"context_obj_type"] ??
"",
454 $news[
"title"] ??
"",
455 $news[
"content_is_lang_var"] ??
false,
456 $news[
"agg_ref_id"] ?? 0,
457 $news[
"aggregation"] ?? []
462 $ilCtrl->setParameter($this,
"news_id", $news[
"id"]);
464 $ilCtrl->getLinkTarget($this,
"showNews");
465 $ilCtrl->clearParameters($this);
474 return '<div class="small">' . (count($this->
getData())) .
" " .
$lng->
txt(
"news_news_items") .
"</div>";
485 if (empty(self::$st_data)) {
490 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
493 $tpl =
new ilTemplate(
"tpl.show_news.html",
true,
true,
"Services/News");
498 $c = current($this->data);
501 if ($this->std_request->getNewsId() > 0) {
502 $news =
new ilNewsItem($this->std_request->getNewsId());
503 $news_context = $this->std_request->getNewsContext();
504 while (
$c[
"id"] > 0 && (
int)
$c[
"id"] !== $this->std_request->getNewsId()) {
506 $c = next($this->data);
510 $news_page = $this->std_request->getNewsPage();
512 while ($curr_cnt - 1 < $news_page) {
514 $c = next($this->data);
515 if ($curr_cnt - 1 === $news_page) {
520 if ((
$c[
"ref_id"] ?? 0) > 0) {
521 $news_context = (
int)
$c[
"ref_id"];
526 if (!is_array(
$c) && is_object($news) && $news->getId() > 0
528 throw new ilException(
"News ID does not match object context.");
534 if (isset(
$c[
"aggregation"]) && is_array(
$c[
"aggregation"])) {
536 "ref_id" =>
$c[
"agg_ref_id"],
537 "agg_ref_id" =>
$c[
"agg_ref_id"],
538 "aggregation" =>
$c[
"aggregation"],
540 "content_type" =>
"text",
544 "content_long" =>
"",
545 "update_date" => $news->getUpdateDate(),
546 "creation_date" =>
"",
547 "content_is_lang_var" =>
false,
548 "loc_context" => $news_context,
549 "context_obj_type" => $news->getContextObjType(),
553 foreach (
$c[
"aggregation"] as $c_item) {
555 $c_item[
"loc_context"] = $c_item[
"ref_id"];
556 $c_item[
"loc_stop"] = $news_context;
557 $news_list[] = $c_item;
561 "id" => $news->getId(),
562 "ref_id" => $news_context,
563 "user_id" => $news->getUserId(),
564 "content_type" => $news->getContentType(),
565 "mob_id" => $news->getMobId(),
566 "visibility" => $news->getVisibility(),
567 "priority" => $news->getPriority(),
568 "content" => $news->getContent(),
569 "content_long" => $news->getContentLong(),
570 "update_date" => $news->getUpdateDate(),
571 "creation_date" => $news->getCreationDate(),
572 "context_sub_obj_type" => $news->getContextSubObjType(),
573 "context_obj_type" => $news->getContextObjType(),
574 "context_sub_obj_id" => $news->getContextSubObjId(),
575 "content_is_lang_var" => $news->getContentIsLangVar(),
576 "content_text_is_lang_var" => $news->getContentTextIsLangVar(),
577 "loc_context" => $news_context,
578 "title" => $news->getTitle()
584 $cache_deleted =
false;
585 foreach ($news_list as $item) {
586 $row_css = ($row_css !==
"tblrow1")
590 if ($item[
"ref_id"] > 0 && !$ilAccess->checkAccess(
"read",
"", $item[
"ref_id"])) {
597 if (!$cache_deleted) {
598 $this->acache->deleteEntry(
$ilUser->getId() .
":" . $this->std_request->getRefId());
599 $cache_deleted =
true;
605 if ($item[
"user_id"] > 0 &&
615 $displayname =
"<" . strtolower(
$lng->
txt(
"deleted")) .
">";
625 $ui_renderer = $this->
ui->renderer();
626 $ui_factory = $this->
ui->factory();
629 $media_path = $this->
getMediaPath((
int) $item[
"mob_id"]);
631 if (in_array($mime, [
"image/jpeg",
"image/svg+xml",
"image/gif",
"image/png"])) {
632 $title = basename($media_path);
633 $html = $ui_renderer->render($ui_factory->image()->responsive($media_path,
$title));
634 } elseif (in_array($mime, [
"video/mp4"])) {
635 $video = $ui_factory->player()->video($media_path);
636 $html = $ui_renderer->render($video);
637 } elseif (in_array($mime, [
"audio/mpeg"])) {
638 $audio = $ui_factory->player()->audio($media_path);
639 $html = $ui_renderer->render($audio);
655 if ($enable_internal_rss && $item[
"visibility"] !=
"") {
660 ((
int) $item[
"priority"] === 0 &&
663 "public_notifications",
676 if (trim($item[
"content"]) !=
"") {
678 $renderer->setNewsItem($it, $item[
"ref_id"]);
683 if ($item[
"update_date"] != $item[
"creation_date"]) {
694 if ($item[
"creation_date"] !=
"") {
706 if ($news_context > 0) {
713 if ($obj_type ===
"file") {
714 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $item[
"ref_id"]);
715 $url = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"sendfile");
716 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->std_request->getRefId());
719 $button->setUrl(
$url);
720 $button->setCaption(
"download");
729 if ($obj_type ===
"frm" && ($item[
"context_sub_obj_type"] ??
"") ===
"pos" 730 && $item[
"context_sub_obj_id"] > 0) {
731 $pos = $item[
"context_sub_obj_id"];
734 $add =
"_" . $thread .
"_" . $pos;
739 if ($obj_type ===
"wiki" && $item[
"context_sub_obj_type"] ===
"wpg" 740 && $item[
"context_sub_obj_id"] > 0) {
742 if ($wptitle !=
"") {
747 $url_target =
"./goto.php?client_id=" . rawurlencode(
CLIENT_ID) .
"&target=" .
748 $obj_type .
"_" . $item[
"ref_id"] . $add;
752 ($item[
"context_sub_obj_type"] ??
"") ===
"pg" &&
753 $item[
"context_sub_obj_id"] > 0 &&
754 in_array($obj_type, [
"lm"],
true)) {
755 $url_target =
"./goto.php?client_id=" . rawurlencode(
CLIENT_ID) .
"&target=" .
756 "pg_" . $item[
"context_sub_obj_id"] .
"_" . $item[
"ref_id"];
760 if ($obj_type ===
"blog" && ($item[
"context_sub_obj_type"] ??
"") ===
"blp" 761 && $item[
"context_sub_obj_id"] > 0) {
762 $url_target =
"./goto.php?client_id=" . rawurlencode(
CLIENT_ID) .
"&target=" .
763 "blog_" . $item[
"ref_id"] .
"_" . $item[
"context_sub_obj_id"];
766 $context_opened =
false;
767 $loc_stop = $item[
"loc_stop"] ??
"";
768 if ($item[
"loc_context"] != null &&
769 $item[
"loc_context"] != $loc_stop
772 $context_opened =
true;
774 $cont_loc->addContextItems($item[
"loc_context"],
true, (
int) $loc_stop);
779 $no_context_title = $item[
"no_context_title"] ??
false;
780 if ($no_context_title !==
true) {
781 if (!$context_opened) {
788 if ($context_opened) {
799 $item[
"context_obj_type"] ??
"",
800 $item[
"title"] ??
"",
801 $item[
"content_is_lang_var"] ??
false,
802 $item[
"agg_ref_id"] ?? 0,
803 $item[
"aggregation"] ?? []
819 $panel = $this->
ui->factory()->panel()->standard(
$title, $this->
ui->factory()->legacy($content));
821 $parameter_name =
'news_page';
823 $pagination = $this->
ui->factory()->viewControl()->pagination()
824 ->withTargetURL($ilCtrl->getLinkTarget($this,
"showNews"),
"news_page")
825 ->withTotalEntries(count($this->
getData()))
827 ->withMaxPaginationButtons(10)
828 ->withCurrentPage($curr_cnt - 1);
831 return $this->
ui->renderer()->render(
$panel);
839 $med = $mob->getMediaItem(
"Standard");
840 if (strcasecmp(
"Reference", $med->getLocationType()) === 0) {
841 $media_path = $med->getLocation();
853 if (is_int(strpos($a_str,
">")) && is_int(strpos($a_str,
"<"))) {
870 (
int) $this->block_id
878 if ($ilCtrl->isAsynch()) {
882 $ilCtrl->returnToParent($this);
893 "hide_notifications",
895 (
int) $this->block_id
903 if ($ilCtrl->isAsynch()) {
907 $ilCtrl->returnToParent($this);
916 return $this->settings_form->getHTML();
931 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
935 "public_notifications",
937 (
int) $this->block_id
943 (
int) $this->block_id
949 (
int) $this->block_id
953 "hide_news_per_date",
955 (
int) $this->block_id
961 (
int) $this->block_id
964 if (is_string($hide_news_date) && $hide_news_date !==
'') {
965 $hide_news_date = explode(
" ", $hide_news_date);
969 $this->settings_form->setTitle(
$lng->
txt(
"news_settings"));
972 if ($this->
getProperty(
"hide_news_block_option")) {
974 $lng->
txt(
"news_hide_news_block"),
978 $ch->setChecked((
bool) $hide_block);
979 $this->settings_form->addItem($ch);
982 $lng->
txt(
"news_hide_news_per_date"),
986 $hnpd->setChecked((
bool) $hide_news_per_date);
989 $lng->
txt(
"news_hide_news_date"),
993 if (is_array($hide_news_date) && count($hide_news_date) === 2) {
996 $dt_prop->setShowTime(
true);
997 $hnpd->addSubItem($dt_prop);
999 $this->settings_form->addItem($hnpd);
1003 if ($enable_internal_rss && $this->
getProperty(
"default_visibility_option")) {
1006 "default_visibility",
1008 (
int) $this->block_id
1010 if ($default_visibility ==
"") {
1011 $default_visibility =
1018 $radio_group->addOption($radio_option);
1020 $radio_group->addOption($radio_option);
1021 $radio_group->
setInfo(
$lng->
txt(
"news_news_item_visibility_info"));
1022 $radio_group->setRequired(
false);
1023 $radio_group->setValue($default_visibility);
1024 $this->settings_form->addItem($radio_group);
1028 if ($enable_internal_rss && $this->
getProperty(
"public_notifications_option")) {
1030 $lng->
txt(
"news_notifications_public"),
1031 "notifications_public" 1034 $ch->setChecked((
bool) $public);
1035 $this->settings_form->addItem($ch);
1039 if ($enable_internal_rss) {
1041 $lng->
txt(
"news_public_feed"),
1042 "notifications_public_feed" 1045 $ch->setChecked((
bool) $public_feed);
1046 $this->settings_form->addItem($ch);
1049 $this->settings_form->addCommandButton(
"saveSettings",
$lng->
txt(
"save"));
1050 $this->settings_form->addCommandButton(
"cancelSettings",
$lng->
txt(
"cancel"));
1051 $this->settings_form->setFormAction($ilCtrl->getFormAction($this));
1066 $lng = $DIC->language();
1067 $block_id = $DIC->ctrl()->getContextObjId();
1070 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1079 if ($default_visibility ==
"") {
1080 $default_visibility =
1083 $radio_group =
new ilRadioGroupInputGUI($lng->txt(
"news_default_visibility"),
"default_visibility");
1084 $radio_option =
new ilRadioOption($lng->txt(
"news_visibility_users"),
"users");
1085 $radio_group->addOption($radio_option);
1086 $radio_option =
new ilRadioOption($lng->txt(
"news_visibility_public"),
"public");
1087 $radio_group->addOption($radio_option);
1088 $radio_group->
setInfo($lng->txt(
"news_news_item_visibility_info"));
1089 $radio_group->setRequired(
false);
1090 $radio_group->setValue($default_visibility);
1091 $a_input->addSubItem($radio_group);
1094 if ($enable_internal_rss) {
1096 $lng->txt(
"news_public_feed"),
1097 "notifications_public_feed" 1099 $radio_rss->
setInfo($lng->txt(
"news_public_feed_info"));
1100 $radio_rss->setChecked((
bool) $public_feed);
1101 $a_input->addSubItem($radio_rss);
1109 $block_id = $DIC->ctrl()->getContextObjId();
1110 foreach ($a_values as
$key => $value) {
1129 if ($form->checkInput()) {
1131 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1133 if ($enable_internal_rss) {
1136 "public_notifications",
1137 $form->getInput(
"notifications_public"),
1139 (
int) $this->block_id
1144 $form->getInput(
"notifications_public_feed"),
1146 (
int) $this->block_id
1150 "default_visibility",
1151 $form->getInput(
"default_visibility"),
1153 (
int) $this->block_id
1157 if ($this->
getProperty(
"hide_news_block_option")) {
1161 $form->getInput(
"hide_news_block"),
1163 (
int) $this->block_id
1167 "hide_news_per_date",
1168 $form->getInput(
"hide_news_per_date"),
1170 (
int) $this->block_id
1174 $hd = $this->settings_form->getItemByPostVar(
"hide_news_date");
1175 $hide_date = $hd->getDate();
1176 if ($hide_date instanceof
ilDateTime && $form->getInput(
"hide_news_per_date")) {
1182 (
int) $this->block_id
1190 (
int) $this->block_id
1196 $cache->deleteEntry(
$ilUser->getId() .
":" . $this->std_request->getRefId());
1198 $ilCtrl->returnToParent($this);
1200 $this->settings_form->setValuesByPost();
1201 return $this->settings_form->getHTML();
1213 $tpl =
new ilTemplate(
"tpl.show_feed_url.html",
true,
true,
"Services/News");
1222 ILIAS_HTTP_PATH .
"/feed.php?client_id=" . rawurlencode(
CLIENT_ID) .
"&user_id=" .
$ilUser->getId() .
1223 "&obj_id=" . $this->block_id .
1228 ILIAS_HTTP_PATH .
"/feed.php?client_id=" . rawurlencode(
CLIENT_ID) .
"&<br />user_id=" .
$ilUser->getId() .
1229 "&obj_id=" . $this->block_id .
1233 $panel = $this->
ui->factory()->panel()->standard(
1234 $lng->
txt(
"news_internal_news"),
1235 $this->
ui->factory()->legacy(
$tpl->
get())
1238 return $this->
ui->renderer()->render(
$panel);
1247 if ($this->new_rendering) {
1251 if ($ilCtrl->getCmd() ===
"hideNotifications" ||
1252 $ilCtrl->getCmd() ===
"showNotifications") {
1256 if ($ilCtrl->getCmdClass() !==
"ilcolumngui" && $ilCtrl->getCmd() !==
"enableJS") {
1262 if ($sess_feed_js !==
"n" &&
1263 (
$ilUser->getPref(
"il_feed_js") !==
"n" || $sess_feed_js ===
"y")) {
1280 $ilCtrl->setParameterByClass(
1286 $rel_tpl =
new ilTemplate(
"tpl.dynamic_reload.html",
true,
true,
"Services/News");
1287 $rel_tpl->setVariable(
"TXT_LOADING",
$lng->
txt(
"news_loading_news"));
1289 $rel_tpl->setVariable(
1291 $ilCtrl->getLinkTargetByClass(
"ilcolumngui",
"updateBlock",
"",
true)
1295 $rel_tpl->setVariable(
"TXT_NEWS_CLICK_HERE",
$lng->
txt(
"news_no_js_click_here"));
1296 $rel_tpl->setVariable(
1298 $ilCtrl->getLinkTargetByClass(strtolower(get_class($this)),
"disableJS")
1301 return $rel_tpl->get();
1314 $rel_tpl =
new ilTemplate(
"tpl.js_enabler.html",
true,
true,
"Services/News");
1316 $rel_tpl->setVariable(
1318 $ilCtrl->getLinkTargetByClass(strtolower(get_class($this)),
"enableJS",
"",
true,
false)
1321 return $rel_tpl->get();
1331 $ilUser->writePref(
"il_feed_js",
"n");
1332 $ilCtrl->returnToParent($this);
1339 $ilUser->writePref(
"il_feed_js",
"y");
1351 if ((
int) ($data[
"id"] ?? 0) === 0) {
1357 $this->
lng->txt(
"date") => $info[
"creation_date"] ??
"" 1361 $item =
$factory->item()->standard(
$factory->link()->standard($info[
"news_title"] ??
"", $info[
"url"] ??
""))
1362 ->withProperties($props);
1363 if (($info[
"ref_id"] ?? 0) > 0) {
1364 $item = $item->withDescription($info[
"type_txt"] .
": " . $info[
"obj_title"]);
1371 return $this->
lng->txt(
"news_no_news_items");
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
static get(string $a_var)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getDefaultVisibilityForRefId(int $a_ref_id)
Get default visibility for reference id.
getListItemForData(array $data)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
ilObjectDefinition $obj_def
get(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
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.
handleView()
Handles show/hide notification view and removes notifications if hidden.
if(isset($_FILES['img_file']) &&is_array($_FILES['img_file'])) $panel
setBlockId(string $a_block_id="0")
setDataSection(string $a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
send(string $output)
Send.
Class ChatMainBarProvider .
setEnableNumInfo(bool $a_enablenuminfo)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
User Interface for NewsItem entities.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
setParameterByClass(string $a_class, string $a_parameter, $a_value)
editSettings()
Show settings screen.
loadLanguageModule(string $a_module)
Load language module.
makeClickable(string $a_str)
BlockGUI class for block NewsForContext.
returnToParent(object $a_gui_obj, string $a_anchor=null)
bool $show_view_selection
getInfoForData(array $news)
StandardGUIRequest $std_request
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilPropertyFormGUI $settings_form
static _lookupObjId(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getRenderer(string $a_context_obj_type)
setRowTemplate(string $a_rowtemplatename, string $a_rowtemplatedir="")
Set Row Template Name.
parses the objects.xml it handles the xml-description of all ilias objects
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
getNextClass($a_gui_class=null)
setVariable($variable, $value='')
Sets a variable value.
getMediaPath(int $mob_id)
static _lookup(string $a_type, string $a_setting, int $a_user=0, int $a_block_id=0)
Lookup setting from database.
static _lookupTitle(int $obj_id)
ilObjectDefinition $obj_definition
fillRow(array $a_set)
get flat list for dashboard
static _write(string $a_type, string $a_setting, string $a_value, int $a_user=0, int $a_block_id=0)
Write setting to database.
getClassName(string $obj_name)
static _lookupObjectId(int $ref_id)
initSettingsForm()
Init setting form.
clearTargets()
clear all targets
static userExists(array $a_usr_ids=array())
static lookupTxtById(string $plugin_id, string $lang_var)
static _getThreadForPosting(int $a_pos_id)
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
static lookupTitle(int $a_page_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static makeUrlTitle(string $a_par)
A news item can be created by different sources.
static _lookupFeedHash(int $a_user_id, bool $a_create=false)
Lookup news feed hash for user.
__construct(Container $dic, ilPlugin $plugin)
setTitle(string $a_title)
static writeSettings(array $a_values)
static addToSettingsForm(ilFormPropertyGUI $a_input)
Add inputs to the container news settings form to configure also the contextBlock options...
static prepareNewsDataFromCache(array $a_cres)
Prepare news data from cache.
This class represents a block method of a block.
static _setRead(int $a_user_id, int $a_news_id)
Set item read.
isPlugin(string $obj_name)
get RBAC status by type returns true if object type is an (activated) plugin type ...
static string $block_type
addBlockCommand(string $a_href, string $a_text, string $a_onclick="")
static _lookupType(int $id, bool $reference=false)
static makeClickable(string $a_text, bool $detectGotoLinks=false)
static _lookupContextObjId(int $a_news_id)
Context Object ID.
getProperty(string $a_property)
static set(string $a_var, $a_val)
Set a value.
setPresentation(int $type)
static shortenWords(string $a_str, int $a_len=30, bool $a_dots=true)
Ensure that the maximum word lenght within a text is not longer than $a_len.
const OBJECTS_WITH_NEWS_SUBTAB
object type names with settings->news settings subtab