25 protected bool $just_notified =
false;
28 public function notifyCreation(
int $obj_id, ?
string $additional_message =
null): void
31 $this->just_notified =
true;
41 ?
string $additional_message =
null
46 if (!$this->just_notified) {
48 $this->just_notified =
true;
52 protected function addNewsNotification(
int $obj_id,
string $a_lang_var, ?
string $description =
null): void
60 $news_item->setContext($obj_id,
'file');
62 $news_item->setTitle($a_lang_var);
63 $news_item->setContentIsLangVar(
true);
64 if ($description && $description !==
'') {
65 $news_item->setContent(
"<p>" . $description .
"</p>");
67 $news_item->setUserId(
$DIC->user()->getId());
A news item can be created by different sources.
if(!file_exists('../ilias.ini.php'))
addNewsNotification(int $obj_id, string $a_lang_var, ?string $description=null)
trait ilObjFileNews
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
notifyCreation(int $obj_id, ?string $additional_message=null)
notifyUpdate(int $obj_id, ?string $additional_message=null)