ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilForumMailEventNotificationSender Class Reference
+ Inheritance diagram for ilForumMailEventNotificationSender:
+ Collaboration diagram for ilForumMailEventNotificationSender:

Public Member Functions

 __construct (protected ilForumNotificationMailData $provider, protected ilLogger $logger)
 
 sendMail (array $a_rcp, bool $a_parse_recipients=true)
 
 send ()
 
 isCronjob ()
 
 setIsCronjob (bool $is_cronjob)
 
- Public Member Functions inherited from ilMailNotification
 __construct (protected bool $is_in_wsp=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

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 = []
 
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
final const SUBJECT_TITLE_LENGTH = 60
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

References ILIAS\GlobalScreen\Provider\__construct().

39  {
40  parent::__construct(false);
41  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ addMailSubject()

ilForumMailEventNotificationSender::addMailSubject ( string  $subject)
private

Definition at line 469 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 462 of file class.ilForumMailEventNotificationSender.php.

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

Referenced by createMailValueObjectsWithAttachments().

462  : string
463  {
464  $body = $this->getPermanentLink();
465 
467  }
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 448 of file class.ilForumMailEventNotificationSender.php.

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

Referenced by createMailValueObjectsWithAttachments().

448  : string
449  {
450  $attachmentText = '';
451  if ($this->provider->getAttachments() !== []) {
452  $this->logger->debug('Adding attachments ...');
453  foreach ($this->provider->getAttachments() as $attachment) {
454  $attachmentText .= $this->getLanguageText('attachment') . ": " . $attachment . "\n";
455  }
456  $attachmentText .= "\n------------------------------------------------------------\n";
457  }
458 
459  return $attachmentText;
460  }
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 402 of file class.ilForumMailEventNotificationSender.php.

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

Referenced by createMailValueObjectsWithAttachments(), and createMailValueObjectWithoutAttachments().

408  : string {
409  $date = $this->createMailDate($date);
410 
411  $this->addMailSubject($subject);
412 
413  $body = ilMail::getSalutation($userId, $this->getLanguage());
414 
415  $body .= "\n\n";
416  $body .= $customText;
417  $body .= "\n\n";
418  $body .= $this->getLanguageText('forum') . ": " . $this->provider->getForumTitle();
419  $body .= "\n\n";
420  if ($this->provider->providesClosestContainer()) {
421  $body .= $this->getLanguageText('obj_' . $this->provider->closestContainer()->getType()) . ": " . $this->provider->closestContainer()->getTitle();
422  $body .= "\n\n";
423  }
424  $body .= $this->getLanguageText('thread') . ": " . $this->provider->getThreadTitle();
425  $body .= "\n\n";
426  $body .= $this->getLanguageText($action) . ": \n------------------------------------------------------------\n";
427 
428  $body .= $this->getLanguageText('author') . ": " . $this->provider->getPostUserName($this->getLanguage());
429  $body .= "\n";
430  $body .= $this->getLanguageText('date') . ": " . $date;
431  $body .= "\n";
432  $body .= $this->getLanguageText('subject') . ": " . $this->provider->getPostTitle();
433  $body .= "\n";
434  $body .= $this->getLanguageText('frm_noti_message');
435  $body .= "\n";
436 
437  $message = strip_tags($this->getPostMessage());
438 
439  if ($this->provider->isPostCensored()) {
440  $message = $this->provider->getCensorshipComment();
441  }
442 
443  $body .= $message . "\n";
444 
445  return $body . "------------------------------------------------------------\n";
446  }
static getSalutation(int $a_usr_id, ?ilLanguage $a_language=null)
getLanguageText(string $a_keyword)
$message
Definition: xapiexit.php:31
+ 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 476 of file class.ilForumMailEventNotificationSender.php.

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

Referenced by createMailBodyText().

476  : string
477  {
479 
480  if ($date === '') {
481  $date = $this->provider->getPostDate();
482  }
483 
485  }
const IL_CAL_DATETIME
static setLanguage(ilLanguage $a_lng)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
language()
description: > Example for rendring a language glyph.
Definition: language.php:41
+ 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

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

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

Referenced by send().

340  $subjectText = $this->createSubjectText($subjectLanguageId);
341 
342  $bodyText = $this->createMailBodyText(
343  $subjectLanguageId,
344  $recipientUserId,
345  $customText,
346  $action,
347  $date
348  );
349 
350  $attachmentText = $this->createAttachmentText();
351  $bodyText .= $attachmentText;
352 
353  $attachmentText = $this->createAttachmentLinkText();
354  $bodyText .= $attachmentText;
355 
356  return new ilMailValueObject(
357  '',
358  ilObjUser::_lookupLogin($recipientUserId),
359  '',
360  '',
361  ilStr::strLen($subjectText) > 255 ? ilStr::substr($subjectText, 0, 255) : $subjectText,
362  $bodyText,
363  $this->provider->getAttachments(),
364  false,
365  false
366  );
367  }
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.

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

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

Referenced by send().

379  $subjectText = $this->createSubjectText($subjectLanguageId);
380 
381  $bodyText = $this->createMailBodyText(
382  $subjectLanguageId,
383  $recipientUserId,
384  $customText,
385  $action,
386  $date
387  );
388 
389  return new ilMailValueObject(
390  '',
391  ilObjUser::_lookupLogin($recipientUserId),
392  '',
393  '',
394  ilStr::strLen($subjectText) > 255 ? ilStr::substr($subjectText, 0, 255) : $subjectText,
395  $bodyText,
396  [],
397  false,
398  false
399  );
400  }
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 487 of file class.ilForumMailEventNotificationSender.php.

References ilMailNotification\getLanguageText().

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

487  : string
488  {
489  $container_text = '';
490  if ($this->provider->providesClosestContainer()) {
491  $container_text = " (" . $this->getLanguageText('frm_noti_obj_' . $this->provider->closestContainer()->getType()) .
492  " \"" . $this->provider->closestContainer()->getTitle() . "\")";
493  }
494 
495  return sprintf(
496  $this->getLanguageText($subject),
497  $this->provider->getForumTitle(),
498  $container_text,
499  $this->provider->getThreadTitle()
500  );
501  }
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 274 of file class.ilForumMailEventNotificationSender.php.

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

Referenced by createAttachmentLinkText().

274  : string
275  {
276  global $DIC;
277  $ilClientIniFile = $DIC['ilClientIniFile'];
278 
279  if ($type === self::PERMANENT_LINK_FORUM) {
280  $language_text = $this->getLanguageText("forums_notification_show_frm");
281  $forum_parameters = $this->provider->getRefId();
282  } else {
283  $language_text = $this->getLanguageText("forums_notification_show_post");
284  $forum_parameters = $this->provider->getRefId() . "_" . $this->provider->getThreadId() . "_" . $this->provider->getPostId();
285  }
286 
287  $this->logger->debug(sprintf(
288  'Building permanent with parameters %s',
289  $forum_parameters
290  ));
291 
292  $posting_link = sprintf(
293  $language_text,
294  ilUtil::_getHttpPath() . "/goto.php?target=frm_" . $forum_parameters . '&client_id=' . CLIENT_ID
295  ) . "\n\n";
296  $posting_link .= sprintf(
297  $this->getLanguageText("forums_notification_intro"),
298  $ilClientIniFile->readVariable("client", "name"),
299  ilUtil::_getHttpPath() . '/?client_id=' . CLIENT_ID
300  ) . "\n\n";
301 
302  $this->logger->debug(sprintf(
303  'Link built: %s',
304  $posting_link
305  ));
306 
307  return $posting_link;
308  }
const CLIENT_ID
Definition: constants.php:41
global $DIC
Definition: shib_login.php:22
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 310 of file class.ilForumMailEventNotificationSender.php.

Referenced by createMailBodyText().

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

◆ initLanguage()

ilForumMailEventNotificationSender::initLanguage ( int  $a_usr_id)
protected

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

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

Referenced by send().

258  : void
259  {
260  parent::initLanguage($a_usr_id);
261  $this->language->loadLanguageModule('forum');
262  }
language()
description: > Example for rendring a language glyph.
Definition: language.php:41
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initMail()

ilForumMailEventNotificationSender::initMail ( )
protected

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

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

Referenced by addMailSubject().

43  : ilMail
44  {
45  $mail = parent::initMail();
46  $this->logger->debug('Initialized mail service');
47 
48  return $mail;
49  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isCronjob()

ilForumMailEventNotificationSender::isCronjob ( )

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

References $is_cronjob.

◆ send()

ilForumMailEventNotificationSender::send ( )

Definition at line 69 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(), null, ilDatePresentation\setLanguage(), ilDatePresentation\setUseRelativeDates(), and ilDatePresentation\useRelativeDates().

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

◆ sendMail()

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

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

References ILIAS\Repository\logger().

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

◆ setIsCronjob()

ilForumMailEventNotificationSender::setIsCronjob ( bool  $is_cronjob)

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

References $is_cronjob.

269  : void
270  {
271  $this->is_cronjob = $is_cronjob;
272  }

◆ setSubject()

ilForumMailEventNotificationSender::setSubject ( string  $a_subject)
protected

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

References ILIAS\Repository\logger().

Referenced by addMailSubject().

61  : string
62  {
63  $value = parent::setSubject($a_subject);
64  $this->logger->debug(sprintf('Setting subject to: %s', $a_subject));
65 
66  return $value;
67  }
+ 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 36 of file class.ilForumMailEventNotificationSender.php.

Referenced by isCronjob(), and setIsCronjob().

◆ 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: