26 protected \ILIAS\DI\UIServices
$ui;
38 $this->
ctrl = $DIC->ctrl();
39 $this->
lng = $DIC->language();
41 $this->
ui = $DIC->ui();
48 $this->news_item = $a_news_item;
49 $this->news_ref_id = $a_news_ref_id;
64 $this->lng_key = $lang_key;
74 if ($this->news_item->getContentTextIsLangVar()) {
75 $this->
lng->loadLanguageModule($this->news_item->getContextObjType());
77 $this->news_item->getContextObjType(),
78 $this->news_item->getContent(),
79 $this->news_item->getContentTextIsLangVar()
83 $content = $this->
makeClickable($this->news_item->getContent());
84 if (!$this->news_item->getContentHtml()) {
85 $content =
"<p>" . nl2br($content) .
"</p>";
87 $content .= $this->news_item->getContentLong();
96 if (is_int(strpos($a_str,
"</a>")) && is_int(strpos($a_str,
"<a"))) {
100 return $this->
refinery->string()->makeClickable()->transform($a_str);
static determineNewsContent(string $a_context_obj_type, string $a_content, bool $a_is_lang_var, ?ilLanguage $lng=null)
Determine new content.
getDetailContent()
Render content for detail view.
getObjectLink()
Get link href for object link.
getTimelineContent()
Render content for timeline.
setLanguage(string $lang_key)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS Refinery Factory $refinery
A news item can be created by different sources.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setNewsItem(ilNewsItem $a_news_item, int $a_news_ref_id)
makeClickable(string $a_str)