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());
addNewsNotification(int $obj_id, string $a_lang_var, string $description=null)
A news item can be created by different sources.
notifyUpdate(int $obj_id, string $additional_message=null)
notifyCreation(int $obj_id, string $additional_message=null)