39 public function __construct(
protected bool $is_in_wsp =
false)
47 $this->subject_lang_id = $a_lang_id;
52 $this->subject_direct = trim($a_text);
57 $this->introduction = $a_lang_id;
62 $this->introduction_direct = trim($a_text);
67 $this->task = $a_lang_id;
72 $this->reason = $a_lang_id;
77 $this->goto_caption = $a_lang_id;
82 $this->changed_by = $a_id;
91 bool $a_multiline =
false,
92 bool $a_lang_direct =
false 94 $this->additional[$a_lang_id] = array(trim($a_value), $a_multiline, $a_lang_direct);
107 ?
string $a_goto_additional =
null,
108 string $a_permission =
"read" 110 $this->all_ref_ids =
null;
116 if (!$this->is_in_wsp) {
118 if (count($ref_ids) === 1) {
119 $this->ref_id = array_shift($ref_ids);
121 $this->all_ref_ids = $ref_ids;
124 } elseif ($this->is_in_wsp) {
125 $this->ref_id = $this->wsp_tree->lookupNodeId($this->
getObjId());
129 if (!$this->goto_caption) {
130 $this->goto_caption =
"url";
134 $recipient_ids = array();
135 foreach (array_unique($a_user_ids) as
$user_id) {
137 if ($this->changed_by === $user_id) {
145 return $recipient_ids;
153 ?
string $a_goto_additional =
null,
154 string $a_permission =
"read",
155 bool $a_append_signature_direct =
false 157 $find_ref_id =
false;
160 if ($this->subject_direct) {
171 if ($this->introduction) {
176 if ($this->introduction_direct) {
177 $this->
appendBody($this->introduction_direct);
191 if (count($this->additional) > 0) {
192 foreach ($this->additional as $lang_id => $item) {
195 $caption = (!$item[2])
203 $this->
appendBody($caption . $item[0] .
"\n");
215 $this->body = trim($this->body);
218 if ($this->changed_by) {
226 if (!$this->
getRefId() && $this->all_ref_ids) {
228 foreach ($this->all_ref_ids as
$ref_id) {
263 $this->body = trim($this->body);
265 if (!$a_append_signature_direct) {
266 $this->
getMail()->appendInstallationSignature(
true);
279 ?
string $a_goto_additional =
null,
280 string $a_permission =
"read" 282 if ($this->
compose($a_user_id, $a_goto_additional, $a_permission)) {
283 $this->
sendMail(array($a_user_id), is_numeric($a_user_id));
294 ?
string $a_goto_additional =
null,
295 string $a_permission =
"read",
296 bool $a_append_signature_direct =
false 298 if ($this->
compose($a_user_id, $a_goto_additional, $a_permission, $a_append_signature_direct)) {
setIntroductionDirect(string $a_text)
appendBody(string $a_body)
sendMail(array $a_rcp, bool $a_parse_recipients=true)
static _getAllReferences(int $id)
get all reference ids for object ID
sendMailAndReturnRecipients(array $a_user_ids, ?string $a_goto_additional=null, string $a_permission="read")
Send notification(s)
setGotoLangId(string $a_lang_id)
static _getAutoGeneratedMessageString(?ilLanguage $lang=null)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
string $introduction_direct
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
static getSalutation(int $a_usr_id, ?ilLanguage $a_language=null)
initLanguage(int $a_usr_id)
getLanguageText(string $a_keyword)
setSubjectDirect(string $a_text)
setIntroductionLangId(string $a_lang_id)
isRefIdAccessible(int $a_user_id, int $a_ref_id, string $a_permission="read")
composeAndGetMessage(int $a_user_id, ?string $a_goto_additional=null, string $a_permission="read", bool $a_append_signature_direct=false)
Compose notification to single recipient.
__construct(protected bool $is_in_wsp=false)
getObjectTitle(bool $a_shorten=false)
createPermanentLink(array $a_params=[], string $a_append='')
__construct(Container $dic, ilPlugin $plugin)
addAdditionalInfo(string $a_lang_id, string $a_value, bool $a_multiline=false, bool $a_lang_direct=false)
Add additional information.
setSubject(string $a_subject)
setChangedByUserId(int $a_id)
composeAndSendMail(int $a_user_id, ?string $a_goto_additional=null, string $a_permission="read")
Send notification to single recipient.
language()
description: > Example for rendring a language glyph.
setTaskLangId(string $a_lang_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setReasonLangId(string $a_lang_id)
static _getInstallationSignature()
setSubjectLangId(string $a_lang_id)
compose(int $a_user_id, ?string $a_goto_additional=null, string $a_permission="read", bool $a_append_signature_direct=false)
Compose notification to single recipient.