35 protected \ILIAS\News\InternalGUIService
$gui;
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"];
66 $this->std_request =
$DIC->news()
71 $this->news_access =
new NewsAccess($this->std_request->getRefId());
73 $ilCtrl =
$DIC->ctrl();
75 $ilUser =
$DIC->user();
76 $ilHelp =
$DIC[
"ilHelp"];
81 $ilHelp->addHelpSection(
"news_block");
83 $this->
setBlockId((
string) $ilCtrl->getContextObjId());
87 $this->dynamic =
false;
90 (
string) $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 (!empty(self::$st_data)) {
103 self::$st_data =
$data;
107 $this->
setRowTemplate(
"tpl.block_row_news_for_context.html",
"components/ILIAS/News");
109 $this->allow_moving =
false;
113 $this->gui =
$DIC->news()->internal()->gui();
130 $news_item->setContextObjId($ilCtrl->getContextObjId());
131 $news_item->setContextObjType($ilCtrl->getContextObjType());
135 $prevent_aggregation =
true;
136 if ($ilCtrl->getContextObjType() !==
"frm") {
137 $forum_grouping =
true;
139 $forum_grouping =
false;
143 $news_data = $news_item->getNewsForRefId(
144 $this->std_request->getRefId(),
148 $prevent_aggregation,
152 $this->acache->storeEntry(
153 $ilUser->getId() .
":" . $this->std_request->getRefId(),
154 serialize($news_data)
176 $ilCtrl =
$DIC->ctrl();
178 if (strcasecmp($ilCtrl->getCmdClass(), ilNewsItemGUI::class) === 0) {
182 switch ($ilCtrl->getCmd()) {
198 if (strcasecmp($this->
ctrl->getNextClass(), ilNewsItemGUI::class) === 0) {
201 return $this->
ctrl->forwardCommand($news_item_gui);
204 $cmd = $this->
ctrl->getCmd(
"getHTML");
205 return $this->$cmd();
217 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
223 (
int) $this->block_id
234 (
int) $this->block_id
236 if ($public_feed && $enable_internal_rss) {
239 ILIAS_HTTP_PATH .
"/feed.php?client_id=" . rawurlencode(
CLIENT_ID) .
"&" .
240 "ref_id=" . $this->std_request->getRefId(),
246 if ($this->news_access->canAdd()) {
248 $ilCtrl->getLinkTargetByClass(ilNewsItemGUI::class,
"editNews"),
252 $ilCtrl->setParameter($this,
"add_mode",
"block");
254 $ilCtrl->getLinkTargetByClass(ilNewsItemGUI::class,
"createNewsItem"),
257 $ilCtrl->setParameter($this,
"add_mode",
"");
261 $ref_id = $this->std_request->getRefId();
266 $parent_gui =
"ilobj" . $obj_class .
"gui";
268 $ilCtrl->setParameterByClass(ilContainerNewsSettingsGUI::class,
"ref_id",
$ref_id);
270 if (in_array($obj_class, self::OBJECTS_WITH_NEWS_SUBTAB)) {
272 $ilCtrl->getLinkTargetByClass([ilRepositoryGUI::class, $parent_gui, ilContainerNewsSettingsGUI::class],
"show"),
282 $ilCtrl->getLinkTarget($this,
"editSettings"),
295 (
int) $this->block_id
304 !$news_set->get(
"enable_rss_for_internal") ||
306 $this->getBlockType(),
309 (
int) $this->block_id
317 return parent::getHTML() . $en;
331 (
int) $this->block_id
335 $got_notices = $got_messages =
false;
336 foreach ($this->data as $row) {
337 if ((
int) ($row[
"priority"] ?? 0) === 0) {
340 if ((
int) ($row[
"priority"] ?? 0) === 1) {
341 $got_messages =
true;
344 $this->show_view_selection =
false;
346 if ($got_notices && $got_messages) {
347 $this->show_view_selection =
true;
348 } elseif ($got_notices) {
361 $info[
"ref_id"] = $news[
"ref_id"] ?? 0;
362 $info[
"creation_date"] =
366 if (($news[
"ref_id"] ?? 0) > 0) {
367 if (isset($news[
"agg_ref_id"]) && $news[
"agg_ref_id"] > 0) {
370 $context_ref = $news[
"agg_ref_id"];
372 $obj_id = $news[
"context_obj_id"];
373 $type = $news[
"context_obj_type"];
374 $context_ref = $news[
"ref_id"];
377 $lang_type = in_array($type, [
"sahs",
"lm",
"htlm"])
386 $info[
"type_txt"] = $type_txt;
389 $info[
"user_read"] = $news[
"user_read"];
391 $ilCtrl->setParameter($this,
"news_context", $context_ref);
393 $ilCtrl->setParameter($this,
"news_context",
"");
397 $info[
"news_title"] =
400 $news[
"context_obj_type"] ??
"",
401 $news[
"title"] ??
"",
402 $news[
"content_is_lang_var"] ??
false,
403 $news[
"agg_ref_id"] ?? 0,
404 $news[
"aggregation"] ?? []
409 $ilCtrl->setParameter($this,
"news_id", $news[
"id"]);
411 $ilCtrl->getLinkTarget($this,
"showNews");
412 $ilCtrl->clearParameters($this);
421 return '<div class="small">' . (count($this->
getData())) .
" " .
$lng->
txt(
"news_news_items") .
"</div>";
432 if (empty(self::$st_data)) {
437 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
440 $tpl =
new ilTemplate(
"tpl.show_news.html",
true,
true,
"components/ILIAS/News");
445 $c = current($this->data);
448 if ($this->std_request->getNewsId() > 0) {
449 $news =
new ilNewsItem($this->std_request->getNewsId());
450 $news_context = $this->std_request->getNewsContext();
451 while (
$c[
"id"] > 0 && (
int)
$c[
"id"] !== $this->std_request->getNewsId()) {
457 $news_page = $this->std_request->getNewsPage();
459 while ($curr_cnt - 1 < $news_page) {
462 if ($curr_cnt - 1 === $news_page) {
467 if ((
$c[
"ref_id"] ?? 0) > 0) {
468 $news_context = (
int)
$c[
"ref_id"];
473 if (!is_array(
$c) && is_object($news) && $news->getId() > 0
475 throw new ilException(
"News ID does not match object context.");
481 if (isset(
$c[
"aggregation"]) && is_array(
$c[
"aggregation"])) {
483 "ref_id" =>
$c[
"agg_ref_id"],
484 "agg_ref_id" =>
$c[
"agg_ref_id"],
485 "aggregation" =>
$c[
"aggregation"],
487 "content_type" =>
"text",
491 "content_long" =>
"",
492 "update_date" => $news->getUpdateDate(),
493 "creation_date" =>
"",
494 "content_is_lang_var" =>
false,
495 "loc_context" => $news_context,
496 "context_obj_type" => $news->getContextObjType(),
500 foreach (
$c[
"aggregation"] as $c_item) {
502 $c_item[
"loc_context"] = $c_item[
"ref_id"];
503 $c_item[
"loc_stop"] = $news_context;
504 $news_list[] = $c_item;
508 "id" => $news->getId(),
509 "ref_id" => $news_context,
510 "user_id" => $news->getUserId(),
511 "content_type" => $news->getContentType(),
512 "mob_id" => $news->getMobId(),
513 "visibility" => $news->getVisibility(),
514 "priority" => $news->getPriority(),
515 "content" => $news->getContent(),
516 "content_long" => $news->getContentLong(),
517 "update_date" => $news->getUpdateDate(),
518 "creation_date" => $news->getCreationDate(),
519 "context_sub_obj_type" => $news->getContextSubObjType(),
520 "context_obj_type" => $news->getContextObjType(),
521 "context_sub_obj_id" => $news->getContextSubObjId(),
522 "content_is_lang_var" => $news->getContentIsLangVar(),
523 "content_text_is_lang_var" => $news->getContentTextIsLangVar(),
524 "loc_context" => $news_context,
525 "title" => $news->getTitle()
531 $cache_deleted =
false;
532 foreach ($news_list as $item) {
533 $row_css = ($row_css !==
"tblrow1")
537 if ($item[
"ref_id"] > 0 && !$ilAccess->checkAccess(
"read",
"", $item[
"ref_id"])) {
544 if (!$cache_deleted) {
545 $this->acache->deleteEntry($ilUser->getId() .
":" . $this->std_request->getRefId());
546 $cache_deleted =
true;
552 if ($item[
"user_id"] > 0 &&
562 $displayname =
"<" . strtolower(
$lng->
txt(
"deleted")) .
">";
572 $ui_renderer = $this->
ui->renderer();
573 $ui_factory = $this->
ui->factory();
576 $media_path = $this->
getMediaPath((
int) $item[
"mob_id"]);
578 if (in_array($mime, [
"image/jpeg",
"image/svg+xml",
"image/gif",
"image/png"])) {
579 $title = basename($media_path);
580 $html = $ui_renderer->render($ui_factory->image()->responsive($media_path,
$title));
581 } elseif (in_array($mime, [
"video/mp4",
"video/youtube",
"video/vimeo"])) {
582 $video = $ui_factory->player()->video($media_path);
583 $html = $ui_renderer->render($video);
584 } elseif (in_array($mime, [
"audio/mpeg"])) {
585 $audio = $ui_factory->player()->audio($media_path);
586 $html = $ui_renderer->render($audio);
587 } elseif (in_array($mime, [
"application/pdf"])) {
588 $this->
ctrl->setParameter($this,
"news_id", $item[
"id"]);
589 $link = $ui_factory->link()->standard(
590 basename($media_path),
591 $this->
ctrl->getLinkTarget($this,
"downloadMob")
593 $html = $ui_renderer->render($link);
594 $this->
ctrl->setParameter($this,
"news_id",
null);
610 if ($enable_internal_rss && $item[
"visibility"] !=
"") {
615 ((
int) $item[
"priority"] === 0 &&
618 "public_notifications",
631 if (trim($item[
"content"]) !=
"") {
633 $renderer->setNewsItem($it, $item[
"ref_id"]);
638 if ($item[
"update_date"] != $item[
"creation_date"]) {
649 if ($item[
"creation_date"] !=
"") {
661 if ($news_context > 0) {
668 if ($obj_type ===
"file") {
669 $ilCtrl->setParameterByClass(ilRepositoryGUI::class,
"ref_id", $item[
"ref_id"]);
670 $url = $ilCtrl->getLinkTargetByClass(ilRepositoryGUI::class,
"sendfile");
671 $ilCtrl->setParameterByClass(ilRepositoryGUI::class,
"ref_id", $this->std_request->getRefId());
673 $button = $this->gui->button(
674 $this->
lng->txt(
"download"),
685 if ($obj_type ===
"frm" && ($item[
"context_sub_obj_type"] ??
"") ===
"pos"
686 && $item[
"context_sub_obj_id"] > 0) {
687 $pos = $item[
"context_sub_obj_id"];
690 $add =
"_" . $thread .
"_" . $pos;
695 if ($obj_type ===
"wiki" && $item[
"context_sub_obj_type"] ===
"wpg"
696 && $item[
"context_sub_obj_id"] > 0) {
698 if ($wptitle !=
"") {
703 $url_target =
"./goto.php?client_id=" . rawurlencode(
CLIENT_ID) .
"&target=" .
704 $obj_type .
"_" . $item[
"ref_id"] . $add;
708 ($item[
"context_sub_obj_type"] ??
"") ===
"pg" &&
709 $item[
"context_sub_obj_id"] > 0 &&
710 in_array($obj_type, [
"lm"],
true)) {
711 $url_target =
"./goto.php?client_id=" . rawurlencode(
CLIENT_ID) .
"&target=" .
712 "pg_" . $item[
"context_sub_obj_id"] .
"_" . $item[
"ref_id"];
716 if ($obj_type ===
"blog" && ($item[
"context_sub_obj_type"] ??
"") ===
"blp"
717 && $item[
"context_sub_obj_id"] > 0) {
718 $url_target =
"./goto.php?client_id=" . rawurlencode(
CLIENT_ID) .
"&target=" .
719 "blog_" . $item[
"ref_id"] .
"_" . $item[
"context_sub_obj_id"];
722 $context_opened =
false;
723 $loc_stop = $item[
"loc_stop"] ??
"";
724 if ($item[
"loc_context"] !=
null &&
725 $item[
"loc_context"] != $loc_stop
728 $context_opened =
true;
730 $cont_loc->addContextItems($item[
"loc_context"],
true, (
int) $loc_stop);
735 $no_context_title = $item[
"no_context_title"] ??
false;
736 if ($no_context_title !==
true) {
737 if (!$context_opened) {
744 if ($context_opened) {
755 $item[
"context_obj_type"] ??
"",
756 $item[
"title"] ??
"",
757 $item[
"content_is_lang_var"] ??
false,
758 $item[
"agg_ref_id"] ?? 0,
759 $item[
"aggregation"] ?? []
775 $panel = $this->
ui->factory()->panel()->standard(
$title, $this->
ui->factory()->legacy()->content($content));
777 $parameter_name =
'news_page';
779 $pagination = $this->
ui->factory()->viewControl()->pagination()
780 ->withTargetURL($ilCtrl->getLinkTarget($this,
"showNews"),
"news_page")
781 ->withTotalEntries(count($this->
getData()))
783 ->withMaxPaginationButtons(10)
784 ->withCurrentPage($curr_cnt - 1);
785 $panel = $panel->withViewControls([$pagination]);
787 return $this->
ui->renderer()->render($panel);
795 $media_path = $mob->getStandardSrc();
804 if (is_int(strpos($a_str,
">")) && is_int(strpos($a_str,
"<"))) {
821 (
int) $this->block_id
829 if ($ilCtrl->isAsynch()) {
833 $ilCtrl->returnToParent($this);
844 "hide_notifications",
846 (
int) $this->block_id
854 if ($ilCtrl->isAsynch()) {
858 $ilCtrl->returnToParent($this);
867 return $this->settings_form->getHTML();
882 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
886 "public_notifications",
888 (
int) $this->block_id
894 (
int) $this->block_id
900 (
int) $this->block_id
904 "hide_news_per_date",
906 (
int) $this->block_id
912 (
int) $this->block_id
915 if (is_string($hide_news_date) && $hide_news_date !==
'') {
916 $hide_news_date = explode(
" ", $hide_news_date);
920 $this->settings_form->setTitle(
$lng->
txt(
"news_settings"));
923 if ($this->
getProperty(
"hide_news_block_option")) {
925 $lng->
txt(
"news_hide_news_block"),
928 $ch->setInfo(
$lng->
txt(
"news_hide_news_block_info"));
929 $ch->setChecked((
bool) $hide_block);
930 $this->settings_form->addItem($ch);
933 $lng->
txt(
"news_hide_news_per_date"),
936 $hnpd->setInfo(
$lng->
txt(
"news_hide_news_per_date_info"));
937 $hnpd->setChecked((
bool) $hide_news_per_date);
940 $lng->
txt(
"news_hide_news_date"),
943 $dt_prop->setRequired(
true);
944 if (is_array($hide_news_date) && count($hide_news_date) === 2) {
947 $dt_prop->setShowTime(
true);
948 $hnpd->addSubItem($dt_prop);
950 $this->settings_form->addItem($hnpd);
954 if ($enable_internal_rss && $this->
getProperty(
"default_visibility_option")) {
957 "default_visibility",
959 (
int) $this->block_id
961 if ($default_visibility ==
"") {
962 $default_visibility =
969 $radio_group->addOption($radio_option);
971 $radio_group->addOption($radio_option);
972 $radio_group->setInfo(
$lng->
txt(
"news_news_item_visibility_info"));
973 $radio_group->setRequired(
false);
974 $radio_group->setValue($default_visibility);
975 $this->settings_form->addItem($radio_group);
979 if ($enable_internal_rss && $this->
getProperty(
"public_notifications_option")) {
981 $lng->
txt(
"news_notifications_public"),
982 "notifications_public"
984 $ch->setInfo(
$lng->
txt(
"news_notifications_public_info"));
985 $ch->setChecked((
bool) $public);
986 $this->settings_form->addItem($ch);
990 if ($enable_internal_rss) {
993 "notifications_public_feed"
995 $ch->setInfo(
$lng->
txt(
"news_public_feed_info"));
996 $ch->setChecked((
bool) $public_feed);
997 $this->settings_form->addItem($ch);
1000 $this->settings_form->addCommandButton(
"saveSettings",
$lng->
txt(
"save"));
1001 $this->settings_form->addCommandButton(
"cancelSettings",
$lng->
txt(
"cancel"));
1002 $this->settings_form->setFormAction($ilCtrl->getFormAction($this));
1015 ->standardRequest();
1021 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1030 if ($default_visibility ==
"") {
1031 $default_visibility =
1036 $radio_group->addOption($radio_option);
1038 $radio_group->addOption($radio_option);
1039 $radio_group->setInfo(
$lng->
txt(
"news_news_item_visibility_info"));
1040 $radio_group->setRequired(
false);
1041 $radio_group->setValue($default_visibility);
1042 $a_input->addSubItem($radio_group);
1045 if ($enable_internal_rss) {
1047 $lng->
txt(
"news_public_feed"),
1048 "notifications_public_feed"
1050 $radio_rss->setInfo(
$lng->
txt(
"news_public_feed_info"));
1051 $radio_rss->setChecked((
bool) $public_feed);
1052 $a_input->addSubItem($radio_rss);
1061 foreach ($a_values as $key => $value) {
1080 if ($form->checkInput()) {
1082 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1084 if ($enable_internal_rss) {
1087 "public_notifications",
1088 $form->getInput(
"notifications_public"),
1090 (
int) $this->block_id
1095 $form->getInput(
"notifications_public_feed"),
1097 (
int) $this->block_id
1101 "default_visibility",
1102 $form->getInput(
"default_visibility"),
1104 (
int) $this->block_id
1108 if ($this->
getProperty(
"hide_news_block_option")) {
1112 $form->getInput(
"hide_news_block"),
1114 (
int) $this->block_id
1118 "hide_news_per_date",
1119 $form->getInput(
"hide_news_per_date"),
1121 (
int) $this->block_id
1125 $hd = $this->settings_form->getItemByPostVar(
"hide_news_date");
1126 $hide_date = $hd->getDate();
1127 if ($hide_date instanceof
ilDateTime && $form->getInput(
"hide_news_per_date")) {
1133 (
int) $this->block_id
1141 (
int) $this->block_id
1147 $cache->deleteEntry($ilUser->getId() .
":" . $this->std_request->getRefId());
1149 $ilCtrl->returnToParent($this);
1151 $this->settings_form->setValuesByPost();
1152 return $this->settings_form->getHTML();
1164 $tpl =
new ilTemplate(
"tpl.show_feed_url.html",
true,
true,
"components/ILIAS/News");
1173 ILIAS_HTTP_PATH .
"/feed.php?client_id=" . rawurlencode(
CLIENT_ID) .
"&user_id=" . $ilUser->getId() .
1174 "&obj_id=" . $this->block_id .
1179 ILIAS_HTTP_PATH .
"/feed.php?client_id=" . rawurlencode(
CLIENT_ID) .
"&<br />user_id=" . $ilUser->getId() .
1180 "&obj_id=" . $this->block_id .
1184 $panel = $this->
ui->factory()->panel()->standard(
1185 $lng->
txt(
"news_internal_news"),
1186 $this->ui->factory()->legacy()->content(
$tpl->
get())
1189 return $this->
ui->renderer()->render($panel);
1197 $ilCtrl->setParameterByClass(
1203 $rel_tpl =
new ilTemplate(
"tpl.dynamic_reload.html",
true,
true,
"components/ILIAS/News");
1204 $rel_tpl->setVariable(
"TXT_LOADING",
$lng->
txt(
"news_loading_news"));
1206 $rel_tpl->setVariable(
1208 $ilCtrl->getLinkTargetByClass(ilColumnGUI::class,
"updateBlock",
"",
true)
1212 $rel_tpl->setVariable(
"TXT_NEWS_CLICK_HERE",
$lng->
txt(
"news_no_js_click_here"));
1213 $rel_tpl->setVariable(
1215 $ilCtrl->getLinkTarget($this,
"disableJS")
1218 return $rel_tpl->get();
1231 $rel_tpl =
new ilTemplate(
"tpl.js_enabler.html",
true,
true,
"components/ILIAS/News");
1233 $rel_tpl->setVariable(
1235 $ilCtrl->getLinkTarget($this,
"enableJS",
"",
true,
false)
1238 return $rel_tpl->get();
1248 $ilUser->writePref(
"il_feed_js",
"n");
1249 $ilCtrl->returnToParent($this);
1256 $ilUser->writePref(
"il_feed_js",
"y");
1262 if ((
int) (
$data[
"id"] ?? 0) === 0) {
1268 $this->
lng->txt(
"date") =>
$info[
"creation_date"] ??
""
1273 ->withProperties($props);
1274 if ((
$info[
"ref_id"] ?? 0) > 0) {
1275 $item = $item->withDescription(
$info[
"type_txt"] .
": " .
$info[
"obj_title"]);
1282 return $this->
lng->txt(
"news_no_news_items");
1287 $news_id = $this->std_request->getNewsId();
1289 $news->deliverMobFile(
"Standard",
true);
setVariable($variable, $value='')
Sets a variable value.
This class represents a block method of a block.
send(string $output)
Send.
setTitle(string $a_title)
setPresentation(int $type)
ilObjectDefinition $obj_def
getProperty(string $a_property)
ILIAS UI Renderer $renderer
addBlockCommand(string $a_href, string $a_text, string $a_onclick="", ?RoundTrip $modal=null)
setBlockId(string $a_block_id="0")
setEnableNumInfo(bool $a_enablenuminfo)
setRowTemplate(string $a_rowtemplatename, string $a_rowtemplatedir="")
Set Row Template Name.
static _write(string $a_type, string $a_setting, string $a_value, int $a_user=0, int $a_block_id=0)
Write setting to database.
static _lookup(string $a_type, string $a_setting, int $a_user=0, int $a_block_id=0)
Lookup setting from database.
returnToParent(object $a_gui_obj, ?string $a_anchor=null)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling
Base class for ILIAS Exception handling.
loadLanguageModule(string $a_module)
Load language module.
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
BlockGUI class for block NewsForContext.
bool $show_view_selection
static string $block_type
StandardGUIRequest $std_request
getMediaPath(int $mob_id)
editSettings()
Show settings screen.
ILIAS News InternalGUIService $gui
ilPropertyFormGUI $settings_form
static writeSettings(array $a_values)
getListItemForData(array $data)
Get list item for data array.
initSettingsForm()
Init setting form.
handleView()
Handles show/hide notification view and removes notifications if hidden.
ilObjectDefinition $obj_definition
getInfoForData(array $news)
const OBJECTS_WITH_NEWS_SUBTAB
object type names with settings->news settings subtab
makeClickable(string $a_str)
static addToSettingsForm(ilFormPropertyGUI $a_input)
Add inputs to the container news settings form to configure also the contextBlock options.
isRepositoryObject()
Returns whether block has a corresponding repository object.
User Interface for NewsItem entities.
A news item can be created by different sources.
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=[], ?ilLanguage $lng=null)
Determine title for news item entry.
static prepareNewsDataFromCache(array $a_cres)
Prepare news data from cache.
static _setRead(int $a_user_id, int $a_news_id)
Set item read.
static _lookupContextObjId(int $a_news_id)
Context Object ID.
static _getDefaultVisibilityForRefId(int $a_ref_id)
Get default visibility for reference id.
static getRenderer(string $a_context_obj_type)
static _getThreadForPosting(int $a_pos_id)
static userExists(array $a_usr_ids=[])
static _lookupFeedHash(int $a_user_id, bool $a_create=false)
parses the objects.xml it handles the xml-description of all ilias objects
isPlugin(string $obj_name)
get RBAC status by type returns true if object type is an (activated) plugin type
getClassName(string $obj_name)
static lookupTxtById(string $plugin_id, string $lang_var)
static _lookupObjectId(int $ref_id)
static _lookupType(int $id, bool $reference=false)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
This class represents an option in a radio group.
static set(string $a_var, $a_val)
Set a value.
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
clearTargets()
clear all targets
special template class to simplify handling of ITX/PEAR
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
get(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
Returns a block with all replacements done.
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
static makeClickable(string $a_text, bool $detectGotoLinks=false, ?string $ilias_http_path=null)
static lookupTitle(int $a_page_id, string $lang="-")
static makeUrlTitle(string $a_par)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.