ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilForumMailEventNotificationSender Class Reference
+ Inheritance diagram for ilForumMailEventNotificationSender:
+ Collaboration diagram for ilForumMailEventNotificationSender:

Public Member Functions

 __construct (ilForumNotificationMailData $provider, ilLogger $logger)
 
 sendMail (array $a_rcp, bool $a_parse_recipients=true)
 
 send ()
 
 isCronjob ()
 
 setIsCronjob (bool $is_cronjob)
 
- Public Member Functions inherited from ilMailNotification
 __construct (bool $a_is_personal_workspace=false)
 
 setType (int $a_type)
 
 getType ()
 
 setSender (int $a_usr_id)
 
 getSender ()
 
 setRecipients (array $a_rcp)
 
 getRecipients ()
 
 setAttachments (array $a_att)
 
 getAttachments ()
 
 setLangModules (array $a_modules)
 
 getUserLanguage (int $a_usr_id)
 
 setRefId (int $a_id)
 
 getRefId ()
 
 getObjId ()
 
 setObjId (int $a_obj_id)
 
 getObjType ()
 
 setAdditionalInformation (array $a_info)
 
 getAdditionalInformation ()
 
 sendMail (array $a_rcp, bool $a_parse_recipients=true)
 
 getBlockBorder ()
 

Protected Member Functions

 initMail ()
 
 setSubject (string $a_subject)
 
 initLanguage (int $a_usr_id)
 
- Protected Member Functions inherited from ilMailNotification
 setSubject (string $a_subject)
 
 getSubject ()
 
 setBody (string $a_body)
 
 appendBody (string $a_body)
 
 getBody ()
 
 initLanguage (int $a_usr_id)
 
 initLanguageByIso2Code (string $a_code='')
 
 setLanguage (ilLanguage $a_language)
 
 getLanguage ()
 
 getLanguageText (string $a_keyword)
 
 getObjectTitle (bool $a_shorten=false)
 
 initMail ()
 
 getMail ()
 
 createPermanentLink (array $a_params=[], string $a_append='')
 
 userToString (int $a_usr_id)
 
 isRefIdAccessible (int $a_user_id, int $a_ref_id, string $a_permission="read")
 

Protected Attributes

ilForumNotificationMailData $provider
 
ilLogger $logger
 
bool $is_cronjob = false
 
- Protected Attributes inherited from ilMailNotification
int $type
 
int $sender
 
ilMail $mail = null
 
string $subject = ''
 
string $body = ''
 
array $attachments = []
 
ilLanguage $language
 
array $lang_modules = []
 
array $recipients = []
 
int $ref_id
 
int $obj_id = 0
 
string $obj_type = ''
 
array $additional_info = []
 
bool $is_in_wsp
 
ilWorkspaceTree $wsp_tree
 
ilWorkspaceAccessHandler $wsp_access_handler
 

Private Member Functions

 getPermanentLink (string $type=self::PERMANENT_LINK_POST)
 
 getPostMessage ()
 
 createMailValueObjectsWithAttachments (string $subjectLanguageId, int $recipientUserId, string $customText, string $action, string $date='')
 Add body and send mail with attachments. More...
 
 createMailValueObjectWithoutAttachments (string $subjectLanguageId, int $recipientUserId, string $customText, string $action, string $date='')
 Add body and send mail without attachments. More...
 
 createMailBodyText (string $subject, int $userId, string $customText, string $action, string $date)
 
 createAttachmentText ()
 
 createAttachmentLinkText ()
 
 addMailSubject (string $subject)
 
 createMailDate (string $date)
 
 createSubjectText (string $subject)
 

Private Attributes

const TYPE_THREAD_DELETED = 54
 
const TYPE_POST_NEW = 60
 
const TYPE_POST_ACTIVATION = 61
 
const TYPE_POST_UPDATED = 62
 
const TYPE_POST_CENSORED = 63
 
const TYPE_POST_DELETED = 64
 
const TYPE_POST_ANSWERED = 65
 
const TYPE_POST_UNCENSORED = 66
 
const PERMANENT_LINK_POST = 'PL_Post'
 
const PERMANENT_LINK_FORUM = 'PL_Forum'
 

Additional Inherited Members

- Data Fields inherited from ilMailNotification
const SUBJECT_TITLE_LENGTH = 60
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilForumMailEventNotificationSender::__construct ( ilForumNotificationMailData  $provider,
ilLogger  $logger 
)

Definition at line 41 of file class.ilForumMailEventNotificationSender.php.

References $logger, $provider, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\logger().

+ Here is the call graph for this function:

Member Function Documentation

◆ addMailSubject()

ilForumMailEventNotificationSender::addMailSubject ( string  $subject)
private

Definition at line 483 of file class.ilForumMailEventNotificationSender.php.

References createSubjectText(), initMail(), and setSubject().

Referenced by createMailBodyText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createAttachmentLinkText()

ilForumMailEventNotificationSender::createAttachmentLinkText ( )
private

Definition at line 475 of file class.ilForumMailEventNotificationSender.php.

References ilMailNotification\$body, ilMail\_getInstallationSignature(), and getPermanentLink().

Referenced by createMailValueObjectsWithAttachments().

475  : string
476  {
477  $body = $this->getPermanentLink();
479 
480  return $body;
481  }
getPermanentLink(string $type=self::PERMANENT_LINK_POST)
static _getInstallationSignature()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createAttachmentText()

ilForumMailEventNotificationSender::createAttachmentText ( )
private

Definition at line 461 of file class.ilForumMailEventNotificationSender.php.

References ilMailNotification\getLanguageText(), and ILIAS\Repository\logger().

Referenced by createMailValueObjectsWithAttachments().

461  : string
462  {
463  $attachmentText = '';
464  if (count($this->provider->getAttachments()) > 0) {
465  $this->logger->debug('Adding attachments ...');
466  foreach ($this->provider->getAttachments() as $attachment) {
467  $attachmentText .= $this->getLanguageText('attachment') . ": " . $attachment . "\n";
468  }
469  $attachmentText .= "\n------------------------------------------------------------\n";
470  }
471 
472  return $attachmentText;
473  }
getLanguageText(string $a_keyword)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createMailBodyText()

ilForumMailEventNotificationSender::createMailBodyText ( string  $subject,
int  $userId,
string  $customText,
string  $action,
string  $date 
)
private

Definition at line 414 of file class.ilForumMailEventNotificationSender.php.

References ilMailNotification\$body, $message, addMailSubject(), createMailDate(), ilMailNotification\getLanguage(), ilMailNotification\getLanguageText(), getPostMessage(), and ilMail\getSalutation().

Referenced by createMailValueObjectsWithAttachments(), and createMailValueObjectWithoutAttachments().

420  : string {
421  $date = $this->createMailDate($date);
422 
423  $this->addMailSubject($subject);
424 
425  $body = ilMail::getSalutation($userId, $this->getLanguage());
426 
427  $body .= "\n\n";
428  $body .= $customText;
429  $body .= "\n\n";
430  $body .= $this->getLanguageText('forum') . ": " . $this->provider->getForumTitle();
431  $body .= "\n\n";
432  if ($this->provider->providesClosestContainer()) {
433  $body .= $this->getLanguageText('obj_' . $this->provider->closestContainer()->getType()) . ": " . $this->provider->closestContainer()->getTitle();
434  $body .= "\n\n";
435  }
436  $body .= $this->getLanguageText('thread') . ": " . $this->provider->getThreadTitle();
437  $body .= "\n\n";
438  $body .= $this->getLanguageText($action) . ": \n------------------------------------------------------------\n";
439 
440  $body .= $this->getLanguageText('author') . ": " . $this->provider->getPostUserName($this->getLanguage());
441  $body .= "\n";
442  $body .= $this->getLanguageText('date') . ": " . $date;
443  $body .= "\n";
444  $body .= $this->getLanguageText('subject') . ": " . $this->provider->getPostTitle();
445  $body .= "\n";
446  $body .= $this->getLanguageText('frm_noti_message');
447  $body .= "\n";
448 
449  $message = strip_tags($this->getPostMessage());
450 
451  if ($this->provider->isPostCensored()) {
452  $message = $this->provider->getCensorshipComment();
453  }
454 
455  $body .= $message . "\n";
456  $body .= "------------------------------------------------------------\n";
457 
458  return $body;
459  }
static getSalutation(int $a_usr_id, ?ilLanguage $a_language=null)
getLanguageText(string $a_keyword)
$message
Definition: xapiexit.php:32
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createMailDate()

ilForumMailEventNotificationSender::createMailDate ( string  $date)
private

Definition at line 490 of file class.ilForumMailEventNotificationSender.php.

References ilDatePresentation\formatDate(), IL_CAL_DATETIME, ILIAS\UI\examples\Symbol\Glyph\Language\language(), and ilDatePresentation\setLanguage().

Referenced by createMailBodyText().

490  : string
491  {
493 
494  if ($date === '') {
495  $date = $this->provider->getPostDate();
496  }
497 
499  }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
static setLanguage(ilLanguage $a_lng)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createMailValueObjectsWithAttachments()

ilForumMailEventNotificationSender::createMailValueObjectsWithAttachments ( string  $subjectLanguageId,
int  $recipientUserId,
string  $customText,
string  $action,
string  $date = '' 
)
private

Add body and send mail with attachments.

Parameters
string$subjectLanguageId- Language id of subject
int$recipientUserId- id of the user recipient of the mail
string$customText- mail text after salutation
string$action- Language id of action
string$date- date to be added in mail
Returns
ilMailValueObject

Definition at line 339 of file class.ilForumMailEventNotificationSender.php.

References ilObjUser\_lookupLogin(), createAttachmentLinkText(), createAttachmentText(), createMailBodyText(), createSubjectText(), and ilStr\strLen().

Referenced by send().

346  $subjectText = $this->createSubjectText($subjectLanguageId);
347 
348  $bodyText = $this->createMailBodyText(
349  $subjectLanguageId,
350  $recipientUserId,
351  $customText,
352  $action,
353  $date
354  );
355 
356  $attachmentText = $this->createAttachmentText();
357  $bodyText .= $attachmentText;
358 
359  $attachmentText = $this->createAttachmentLinkText();
360  $bodyText .= $attachmentText;
361 
362  return new ilMailValueObject(
363  '',
364  ilObjUser::_lookupLogin($recipientUserId),
365  '',
366  '',
367  ilStr::strLen($subjectText) > 255 ? ilStr::substr($subjectText, 0, 255) : $subjectText,
368  $bodyText,
369  $this->provider->getAttachments(),
370  false,
371  false
372  );
373  }
static strLen(string $a_string)
Definition: class.ilStr.php:63
createMailBodyText(string $subject, int $userId, string $customText, string $action, string $date)
static _lookupLogin(int $a_user_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createMailValueObjectWithoutAttachments()

ilForumMailEventNotificationSender::createMailValueObjectWithoutAttachments ( string  $subjectLanguageId,
int  $recipientUserId,
string  $customText,
string  $action,
string  $date = '' 
)
private

Add body and send mail without attachments.

Parameters
string$subjectLanguageId- Language id of subject
int$recipientUserId
string$customText- mail text after salutation
string$action- Language id of action
string$date- date to be added in mail
Returns
ilMailValueObject

Definition at line 384 of file class.ilForumMailEventNotificationSender.php.

References ilObjUser\_lookupLogin(), createMailBodyText(), createSubjectText(), and ilStr\strLen().

Referenced by send().

391  $subjectText = $this->createSubjectText($subjectLanguageId);
392 
393  $bodyText = $this->createMailBodyText(
394  $subjectLanguageId,
395  $recipientUserId,
396  $customText,
397  $action,
398  $date
399  );
400 
401  return new ilMailValueObject(
402  '',
403  ilObjUser::_lookupLogin($recipientUserId),
404  '',
405  '',
406  ilStr::strLen($subjectText) > 255 ? ilStr::substr($subjectText, 0, 255) : $subjectText,
407  $bodyText,
408  [],
409  false,
410  false
411  );
412  }
static strLen(string $a_string)
Definition: class.ilStr.php:63
createMailBodyText(string $subject, int $userId, string $customText, string $action, string $date)
static _lookupLogin(int $a_user_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createSubjectText()

ilForumMailEventNotificationSender::createSubjectText ( string  $subject)
private

Definition at line 501 of file class.ilForumMailEventNotificationSender.php.

References ilMailNotification\getLanguageText().

Referenced by addMailSubject(), createMailValueObjectsWithAttachments(), and createMailValueObjectWithoutAttachments().

501  : string
502  {
503  $container_text = '';
504  if ($this->provider->providesClosestContainer()) {
505  $container_text = " (" . $this->getLanguageText('frm_noti_obj_' . $this->provider->closestContainer()->getType()) .
506  " \"" . $this->provider->closestContainer()->getTitle() . "\")";
507  }
508 
509  return sprintf(
510  $this->getLanguageText($subject),
511  $this->provider->getForumTitle(),
512  $container_text,
513  $this->provider->getThreadTitle()
514  );
515  }
getLanguageText(string $a_keyword)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPermanentLink()

ilForumMailEventNotificationSender::getPermanentLink ( string  $type = self::PERMANENT_LINK_POST)
private

Definition at line 279 of file class.ilForumMailEventNotificationSender.php.

References $DIC, ilMailNotification\$type, ilUtil\_getHttpPath(), CLIENT_ID, ilMailNotification\getLanguageText(), and ILIAS\Repository\logger().

Referenced by createAttachmentLinkText().

279  : string
280  {
281  global $DIC;
282  $ilClientIniFile = $DIC['ilClientIniFile'];
283 
284  if ($type === self::PERMANENT_LINK_FORUM) {
285  $language_text = $this->getLanguageText("forums_notification_show_frm");
286  $forum_parameters = $this->provider->getRefId();
287  } else {
288  $language_text = $this->getLanguageText("forums_notification_show_post");
289  $forum_parameters = $this->provider->getRefId() . "_" . $this->provider->getThreadId() . "_" . $this->provider->getPostId();
290  }
291 
292  $this->logger->debug(sprintf(
293  'Building permanent with parameters %s',
294  $forum_parameters
295  ));
296 
297  $posting_link = sprintf(
298  $language_text,
299  ilUtil::_getHttpPath() . "/goto.php?target=frm_" . $forum_parameters . '&client_id=' . CLIENT_ID
300  ) . "\n\n";
301  $posting_link .= sprintf(
302  $this->getLanguageText("forums_notification_intro"),
303  $ilClientIniFile->readVariable("client", "name"),
304  ilUtil::_getHttpPath() . '/?client_id=' . CLIENT_ID
305  ) . "\n\n";
306 
307  $this->logger->debug(sprintf(
308  'Link built: %s',
309  $posting_link
310  ));
311 
312  return $posting_link;
313  }
global $DIC
Definition: feed.php:28
const CLIENT_ID
Definition: constants.php:41
getLanguageText(string $a_keyword)
static _getHttpPath()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPostMessage()

ilForumMailEventNotificationSender::getPostMessage ( )
private

Definition at line 315 of file class.ilForumMailEventNotificationSender.php.

Referenced by createMailBodyText().

315  : string
316  {
317  $pos_message = $this->provider->getPostMessage();
318  if (strip_tags($pos_message) !== $pos_message) {
319  $pos_message = preg_replace("/\n/i", "", $pos_message);
320  $pos_message = preg_replace("/<li([^>]*)>/i", "\n<li$1>", $pos_message);
321  $pos_message = preg_replace("/<\/ul([^>]*)>(?!\s*?(<p|<ul))/i", "</ul$1>\n", $pos_message);
322  $pos_message = preg_replace("/<br(\s*)(\/?)>/i", "\n", $pos_message);
323  $pos_message = preg_replace("/<p([^>]*)>/i", "\n\n", $pos_message);
324  return preg_replace("/<\/p([^>]*)>/i", '', $pos_message);
325  }
326 
327  return $pos_message;
328  }
+ Here is the caller graph for this function:

◆ initLanguage()

ilForumMailEventNotificationSender::initLanguage ( int  $a_usr_id)
protected

Definition at line 263 of file class.ilForumMailEventNotificationSender.php.

References ILIAS\UI\examples\Symbol\Glyph\Language\language().

Referenced by send().

263  : void
264  {
265  parent::initLanguage($a_usr_id);
266  $this->language->loadLanguageModule('forum');
267  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initMail()

ilForumMailEventNotificationSender::initMail ( )
protected

Definition at line 48 of file class.ilForumMailEventNotificationSender.php.

References ilMailNotification\$mail, and ILIAS\Repository\logger().

Referenced by addMailSubject().

48  : ilMail
49  {
50  $mail = parent::initMail();
51  $this->logger->debug('Initialized mail service');
52 
53  return $mail;
54  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isCronjob()

ilForumMailEventNotificationSender::isCronjob ( )

Definition at line 269 of file class.ilForumMailEventNotificationSender.php.

References $is_cronjob.

◆ send()

ilForumMailEventNotificationSender::send ( )

Definition at line 74 of file class.ilForumMailEventNotificationSender.php.

References $DIC, $ilSetting, $lng, ANONYMOUS_USER_ID, createMailValueObjectsWithAttachments(), createMailValueObjectWithoutAttachments(), ilMailFormCall\getContextId(), ilMailFormCall\getContextParameters(), ilMailNotification\getLanguageText(), ilMailNotification\getRecipients(), ilMailNotification\getType(), initLanguage(), ILIAS\Repository\logger(), ilDatePresentation\setLanguage(), ilDatePresentation\setUseRelativeDates(), and ilDatePresentation\useRelativeDates().

74  : bool
75  {
76  global $DIC;
77  $ilSetting = $DIC->settings();
78  $lng = $DIC->language();
79 
80  if (!$ilSetting->get('forum_notification', '0')) {
81  $this->logger->debug('Forum notifications are globally disabled');
82 
83  return false;
84  }
85 
86  if (!$this->getRecipients()) {
87  $this->logger->debug('No notification recipients, nothing to do');
88 
89  return false;
90  }
91 
92  $lng->loadLanguageModule('forum');
93 
96 
97  $mailObjects = [];
98 
99  switch ($this->getType()) {
100  case self::TYPE_THREAD_DELETED:
101  foreach ($this->getRecipients() as $rcp) {
102  $this->initLanguage($rcp);
103  $customText = sprintf(
104  $this->getLanguageText('thread_deleted_by'),
105  $this->provider->getDeletedBy(),
106  $this->provider->getForumTitle()
107  );
108 
109  $mailObjects[] = $this->createMailValueObjectWithoutAttachments(
110  'frm_noti_subject_del_thread',
111  (int) $rcp,
112  $customText,
113  'content_deleted_thread'
114  );
115  }
116  break;
117 
118  case self::TYPE_POST_NEW:
119  foreach ($this->getRecipients() as $rcp) {
120  $this->initLanguage($rcp);
121  $customText = sprintf(
122  $this->getLanguageText('frm_noti_new_post'),
123  $this->provider->getForumTitle()
124  );
125 
126  $mailObjects[] = $this->createMailValueObjectsWithAttachments(
127  'frm_noti_subject_new_post',
128  (int) $rcp,
129  $customText,
130  'new_post'
131  );
132  }
133  break;
134 
135  case self::TYPE_POST_ACTIVATION:
136  foreach ($this->getRecipients() as $rcp) {
137  $this->initLanguage($rcp);
138  $customText = $this->getLanguageText('forums_post_activation_mail');
139 
140  $mailObjects[] = $this->createMailValueObjectsWithAttachments(
141  'frm_noti_subject_act_post',
142  (int) $rcp,
143  $customText,
144  'new_post'
145  );
146  }
147  break;
148 
149  case self::TYPE_POST_ANSWERED:
150  foreach ($this->getRecipients() as $rcp) {
151  $this->initLanguage($rcp);
152  $customText = $this->getLanguageText('forum_post_replied');
153 
154  $mailObjects[] = $this->createMailValueObjectsWithAttachments(
155  'frm_noti_subject_answ_post',
156  (int) $rcp,
157  $customText,
158  'new_post'
159  );
160  }
161  break;
162 
163  case self::TYPE_POST_UPDATED:
164  foreach ($this->getRecipients() as $rcp) {
165  $this->initLanguage($rcp);
166  $customText = sprintf(
167  $this->getLanguageText('post_updated_by'),
168  $this->provider->getPostUpdateUserName($this->getLanguage()),
169  $this->provider->getForumTitle()
170  );
171  $date = $this->provider->getPostUpdate();
172 
173  $mailObjects[] = $this->createMailValueObjectsWithAttachments(
174  'frm_noti_subject_upt_post',
175  (int) $rcp,
176  $customText,
177  'content_post_updated',
178  $date
179  );
180  }
181  break;
182 
183  case self::TYPE_POST_CENSORED:
184  foreach ($this->getRecipients() as $rcp) {
185  $this->initLanguage($rcp);
186  $customText = sprintf(
187  $this->getLanguageText('post_censored_by'),
188  $this->provider->getPostUpdateUserName($this->getLanguage()),
189  $this->provider->getForumTitle()
190  );
191  $date = $this->provider->getPostCensoredDate();
192 
193  $mailObjects[] = $this->createMailValueObjectsWithAttachments(
194  'frm_noti_subject_cens_post',
195  (int) $rcp,
196  $customText,
197  'content_censored_post',
198  $date
199  );
200  }
201  break;
202 
203  case self::TYPE_POST_UNCENSORED:
204  foreach ($this->getRecipients() as $rcp) {
205  $this->initLanguage($rcp);
206  $customText = sprintf(
207  $this->getLanguageText('post_uncensored_by'),
208  $this->provider->getPostUpdateUserName($this->getLanguage())
209  );
210  $date = $this->provider->getPostCensoredDate();
211 
212  $mailObjects[] = $this->createMailValueObjectsWithAttachments(
213  'frm_noti_subject_uncens_post',
214  (int) $rcp,
215  $customText,
216  'forums_the_post',
217  $date
218  );
219  }
220  break;
221 
222  case self::TYPE_POST_DELETED:
223  foreach ($this->getRecipients() as $rcp) {
224  $this->initLanguage($rcp);
225  $customText = sprintf(
226  $this->getLanguageText('post_deleted_by'),
227  $this->provider->getDeletedBy(),
228  $this->provider->getForumTitle()
229  );
230 
231  $mailObjects[] = $this->createMailValueObjectWithoutAttachments(
232  'frm_noti_subject_del_post',
233  (int) $rcp,
234  $customText,
235  'content_deleted_post'
236  );
237  }
238  break;
239  }
240 
241  $contextId = ilMailFormCall::getContextId();
242  if (null === $contextId) {
243  $contextId = '';
244  }
245 
246  $contextParameters = ilMailFormCall::getContextParameters();
247 
248  $processor = new ilMassMailTaskProcessor();
249 
250  $processor->run(
251  $mailObjects,
253  $contextId,
254  $contextParameters
255  );
256 
259 
260  return true;
261  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
$lng
static setLanguage(ilLanguage $a_lng)
global $DIC
Definition: feed.php:28
createMailValueObjectsWithAttachments(string $subjectLanguageId, int $recipientUserId, string $customText, string $action, string $date='')
Add body and send mail with attachments.
getLanguageText(string $a_keyword)
global $ilSetting
Definition: privfeed.php:17
createMailValueObjectWithoutAttachments(string $subjectLanguageId, int $recipientUserId, string $customText, string $action, string $date='')
Add body and send mail without attachments.
static setUseRelativeDates(bool $a_status)
set use relative dates
+ Here is the call graph for this function:

◆ sendMail()

ilForumMailEventNotificationSender::sendMail ( array  $a_rcp,
bool  $a_parse_recipients = true 
)

Definition at line 56 of file class.ilForumMailEventNotificationSender.php.

References ILIAS\Repository\logger().

56  : void
57  {
58  $this->logger->debug(sprintf(
59  'Delegating notification transport to mail service for recipient "%s" ...',
60  json_encode($a_rcp, JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT)
61  ));
62  parent::sendMail($a_rcp, $a_parse_recipients);
63  $this->logger->debug('Notification transport delegated');
64  }
+ Here is the call graph for this function:

◆ setIsCronjob()

ilForumMailEventNotificationSender::setIsCronjob ( bool  $is_cronjob)

Definition at line 274 of file class.ilForumMailEventNotificationSender.php.

References $is_cronjob.

274  : void
275  {
276  $this->is_cronjob = $is_cronjob;
277  }

◆ setSubject()

ilForumMailEventNotificationSender::setSubject ( string  $a_subject)
protected

Definition at line 66 of file class.ilForumMailEventNotificationSender.php.

References ILIAS\Repository\logger().

Referenced by addMailSubject().

66  : string
67  {
68  $value = parent::setSubject($a_subject);
69  $this->logger->debug(sprintf('Setting subject to: %s', $a_subject));
70 
71  return $value;
72  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $is_cronjob

bool ilForumMailEventNotificationSender::$is_cronjob = false
protected

Definition at line 39 of file class.ilForumMailEventNotificationSender.php.

Referenced by isCronjob(), and setIsCronjob().

◆ $logger

ilLogger ilForumMailEventNotificationSender::$logger
protected

Definition at line 38 of file class.ilForumMailEventNotificationSender.php.

Referenced by __construct().

◆ $provider

ilForumNotificationMailData ilForumMailEventNotificationSender::$provider
protected

Definition at line 37 of file class.ilForumMailEventNotificationSender.php.

Referenced by __construct().

◆ PERMANENT_LINK_FORUM

const ilForumMailEventNotificationSender::PERMANENT_LINK_FORUM = 'PL_Forum'
private

Definition at line 35 of file class.ilForumMailEventNotificationSender.php.

◆ PERMANENT_LINK_POST

const ilForumMailEventNotificationSender::PERMANENT_LINK_POST = 'PL_Post'
private

Definition at line 34 of file class.ilForumMailEventNotificationSender.php.

◆ TYPE_POST_ACTIVATION

const ilForumMailEventNotificationSender::TYPE_POST_ACTIVATION = 61
private

Definition at line 28 of file class.ilForumMailEventNotificationSender.php.

◆ TYPE_POST_ANSWERED

const ilForumMailEventNotificationSender::TYPE_POST_ANSWERED = 65
private

Definition at line 32 of file class.ilForumMailEventNotificationSender.php.

◆ TYPE_POST_CENSORED

const ilForumMailEventNotificationSender::TYPE_POST_CENSORED = 63
private

Definition at line 30 of file class.ilForumMailEventNotificationSender.php.

◆ TYPE_POST_DELETED

const ilForumMailEventNotificationSender::TYPE_POST_DELETED = 64
private

Definition at line 31 of file class.ilForumMailEventNotificationSender.php.

◆ TYPE_POST_NEW

const ilForumMailEventNotificationSender::TYPE_POST_NEW = 60
private

Definition at line 27 of file class.ilForumMailEventNotificationSender.php.

◆ TYPE_POST_UNCENSORED

const ilForumMailEventNotificationSender::TYPE_POST_UNCENSORED = 66
private

Definition at line 33 of file class.ilForumMailEventNotificationSender.php.

◆ TYPE_POST_UPDATED

const ilForumMailEventNotificationSender::TYPE_POST_UPDATED = 62
private

Definition at line 29 of file class.ilForumMailEventNotificationSender.php.

◆ TYPE_THREAD_DELETED

const ilForumMailEventNotificationSender::TYPE_THREAD_DELETED = 54
private

Definition at line 26 of file class.ilForumMailEventNotificationSender.php.


The documentation for this class was generated from the following file: