ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMailEventNotificationSender Class Reference
+ Inheritance diagram for ilMailEventNotificationSender:
+ Collaboration diagram for ilMailEventNotificationSender:

Public Member Functions

 __construct (ilForumNotificationMailData $provider, \ilLogger $logger)
 ilForumMailNotification constructor. More...
 
 sendMail (array $a_rcp, $a_parse_recipients=true)
 
 send ()
 
 isCronjob ()
 
 setIsCronjob ($is_cronjob)
 
- Public Member Functions inherited from ilMailNotification
 __construct ($a_is_personal_workspace=false)
 
 setType ($a_type)
 Set notification type. More...
 
 getType ()
 Get notification type. More...
 
 setSender ($a_usr_id)
 Set sender of mail. More...
 
 getSender ()
 get sender of mail More...
 
 setRecipients (array $a_rcp)
 
 getRecipients ()
 get array of recipients More...
 
 setAttachments ($a_att)
 Set attachments. More...
 
 getAttachments ()
 Get attachments. More...
 
 setLangModules (array $a_modules)
 Set lang modules. More...
 
 getUserLanguage ($a_usr_id)
 Get user language. More...
 
 setRefId ($a_id)
 
 getRefId ()
 
 getObjId ()
 
 setObjId ($a_obj_id)
 
 getObjType ()
 Get object type. More...
 
 setAdditionalInformation (array $a_info)
 Additional information for creating notification mails. More...
 
 getAdditionalInformation ()
 
 sendMail (array $a_rcp, $a_parse_recipients=true)
 
 getBlockBorder ()
 Get (ascii) block border. More...
 

Data Fields

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'
 
- Data Fields inherited from ilMailNotification
const SUBJECT_TITLE_LENGTH = 60
 

Protected Member Functions

 initMail ()
 
 setSubject ($a_subject)
 
 initLanguage ($a_usr_id)
 
- Protected Member Functions inherited from ilMailNotification
 setSubject ($a_subject)
 
 getSubject ()
 
 setBody ($a_body)
 
 appendBody ($a_body)
 Append body text. More...
 
 getBody ()
 
 initLanguage ($a_usr_id)
 Init language. More...
 
 initLanguageByIso2Code ($a_code='')
 Init language by ISO2 code. More...
 
 setLanguage ($a_language)
 
 getLanguage ()
 
 getLanguageText ($a_keyword)
 
 getObjectTitle ($a_shorten=false)
 
 initMail ()
 
 getMail ()
 
 createPermanentLink ($a_params=array(), $a_append='')
 
 userToString ($a_usr_id)
 
 isRefIdAccessible ($a_user_id, $a_ref_id, $a_permission="read")
 Check if ref id is accessible for user. More...
 

Protected Attributes

 $is_cronjob = false
 
 $provider
 
 $logger
 
- Protected Attributes inherited from ilMailNotification
 $type = null
 
 $sender = null
 
 $mail = null
 
 $subject = ''
 
 $body = ''
 
 $attachments = array()
 
 $language = null
 
 $lang_modules = array()
 
 $recipients = array()
 
 $ref_id = null
 
 $obj_id = null
 
 $obj_type = null
 
 $additional_info = array()
 
 $is_in_wsp
 
 $wsp_tree
 
 $wsp_access_handler
 

Private Member Functions

 getPermanentLink ($type=self::PERMANENT_LINK_POST)
 
 getSecurePostMessage ()
 
 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)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMailEventNotificationSender::__construct ( ilForumNotificationMailData  $provider,
\ilLogger  $logger 
)

ilForumMailNotification constructor.

Parameters
ilForumNotificationMailData$provider
ilLogger$logger

Definition at line 49 of file class.ilMailEventNotificationSender.php.

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

50  {
51  parent::__construct(false);
52  $this->provider = $provider;
53  $this->logger = $logger;
54  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ addMailSubject()

ilMailEventNotificationSender::addMailSubject ( string  $subject)
private
Parameters
string$subject

Definition at line 545 of file class.ilMailEventNotificationSender.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()

ilMailEventNotificationSender::createAttachmentLinkText ( )
private

Definition at line 533 of file class.ilMailEventNotificationSender.php.

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

Referenced by createMailValueObjectsWithAttachments().

534  {
535  $body = $this->getPermanentLink();
537 
538  return $body;
539  }
getPermanentLink($type=self::PERMANENT_LINK_POST)
static _getInstallationSignature()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createAttachmentText()

ilMailEventNotificationSender::createAttachmentText ( )
private

Definition at line 519 of file class.ilMailEventNotificationSender.php.

References ilMailNotification\getLanguageText().

Referenced by createMailValueObjectsWithAttachments().

520  {
521  $attachmentText = '';
522  if (count($this->provider->getAttachments()) > 0) {
523  $this->logger->debug('Adding attachments ...');
524  foreach ($this->provider->getAttachments() as $attachment) {
525  $attachmentText .= $this->getLanguageText('attachment') . ": " . $attachment . "\n";
526  }
527  $attachmentText .= "\n------------------------------------------------------------\n";
528  }
529 
530  return $attachmentText;
531  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createMailBodyText()

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

Definition at line 476 of file class.ilMailEventNotificationSender.php.

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

Referenced by createMailValueObjectsWithAttachments(), and createMailValueObjectWithoutAttachments().

482  {
483  $date = $this->createMailDate($date);
484 
485  $this->addMailSubject($subject);
486 
487  $body = ilMail::getSalutation($userId, $this->getLanguage());
488 
489  $body .= "\n\n";
490  $body .= $customText;
491  $body .= "\n\n";
492  $body .= $this->getLanguageText('forum') . ": " . $this->provider->getForumTitle();
493  $body .= "\n\n";
494  $body .= $this->getLanguageText('thread') . ": " . $this->provider->getThreadTitle();
495  $body .= "\n\n";
496  $body .= $this->getLanguageText($action) . ": \n------------------------------------------------------------\n";
497 
498  $body .= $this->getLanguageText('author') . ": " . $this->provider->getPostUserName($this->getLanguage());
499  $body .= "\n";
500  $body .= $this->getLanguageText('date') . ": " . $date;
501  $body .= "\n";
502  $body .= $this->getLanguageText('subject') . ": " . $this->provider->getPostTitle();
503  $body .= "\n";
504  $body .= $this->getLanguageText('frm_noti_message');
505  $body .= "\n";
506 
507  $message = strip_tags($this->getSecurePostMessage());
508 
509  if ($this->provider->getPostCensored() == 1) {
510  $message = $this->provider->getCensorshipComment();
511  }
512 
513  $body .= $message . "\n";
514  $body .= "------------------------------------------------------------\n";
515 
516  return $body;
517  }
$message
Definition: xapiexit.php:14
static getSalutation($a_usr_id, ilLanguage $a_language=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createMailDate()

ilMailEventNotificationSender::createMailDate ( string  $date)
private
Parameters
string$date
Returns
string
Exceptions
ilDateTimeException

Definition at line 559 of file class.ilMailEventNotificationSender.php.

References ilDatePresentation\formatDate(), IL_CAL_DATETIME, language(), and ilDatePresentation\setLanguage().

Referenced by createMailBodyText().

559  : string
560  {
562 
563  if ($date === '') {
564  $date = $this->provider->getPostDate();
565  }
566 
568 
569  return $date;
570  }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static setLanguage($a_lng)
set language
language()
Definition: language.php:2
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createMailValueObjectsWithAttachments()

ilMailEventNotificationSender::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 | null$date- date to be added in mail
Returns
ilMailValueObject

Definition at line 396 of file class.ilMailEventNotificationSender.php.

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

Referenced by send().

402  {
403  $subjectText = $this->createSubjectText($subjectLanguageId);
404 
405  $bodyText = $this->createMailBodyText(
406  $subjectLanguageId,
407  $recipientUserId,
408  $customText,
409  $action,
410  $date
411  );
412 
413  $attachmentText = $this->createAttachmentText();
414  $bodyText .= $attachmentText;
415 
416  $attachmentText = $this->createAttachmentLinkText();
417  $bodyText .= $attachmentText;
418 
419  $mailObject = new ilMailValueObject(
420  '',
421  ilObjUser::_lookupLogin($recipientUserId),
422  '',
423  '',
424  $subjectText,
425  $bodyText,
426  $this->provider->getAttachments(),
427  false,
428  false
429  );
430 
431  return $mailObject;
432  }
static _lookupLogin($a_user_id)
lookup login
createMailBodyText(string $subject, int $userId, string $customText, string $action, string $date)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createMailValueObjectWithoutAttachments()

ilMailEventNotificationSender::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 | null$date- date to be added in mail
Returns
ilMailValueObject

Definition at line 444 of file class.ilMailEventNotificationSender.php.

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

Referenced by send().

450  {
451  $subjectText = $this->createSubjectText($subjectLanguageId);
452 
453  $bodyText = $this->createMailBodyText(
454  $subjectLanguageId,
455  $recipientUserId,
456  $customText,
457  $action,
458  $date
459  );
460 
461  $mailObject = new ilMailValueObject(
462  '',
463  ilObjUser::_lookupLogin($recipientUserId),
464  '',
465  '',
466  $subjectText,
467  $bodyText,
468  [],
469  false,
470  false
471  );
472 
473  return $mailObject;
474  }
static _lookupLogin($a_user_id)
lookup login
createMailBodyText(string $subject, int $userId, string $customText, string $action, string $date)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createSubjectText()

ilMailEventNotificationSender::createSubjectText ( string  $subject)
private
Parameters
string$subject
Returns
string

Definition at line 576 of file class.ilMailEventNotificationSender.php.

References ilMailNotification\getLanguageText().

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

576  : string
577  {
578  return sprintf(
579  $this->getLanguageText($subject),
580  $this->provider->getForumTitle(),
581  $this->provider->getThreadTitle()
582  );
583  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPermanentLink()

ilMailEventNotificationSender::getPermanentLink (   $type = self::PERMANENT_LINK_POST)
private
Parameters
string$type
Returns
string

Definition at line 316 of file class.ilMailEventNotificationSender.php.

References $DIC, ilMailNotification\$type, ilUtil\_getHttpPath(), ilMailNotification\getLanguageText(), and isCronjob().

Referenced by createAttachmentLinkText().

317  {
318  global $DIC;
319  $ilClientIniFile = $DIC['ilClientIniFile'];
320 
321  if ($type == self::PERMANENT_LINK_FORUM) {
322  $language_text = $this->getLanguageText("forums_notification_show_frm");
323  $forum_parameters = $this->provider->getRefId();
324  } else {
325  $language_text = $this->getLanguageText("forums_notification_show_post");
326  $forum_parameters = $this->provider->getRefId() . "_" . $this->provider->getThreadId() . "_" . $this->provider->getPostId();
327  }
328 
329  $this->logger->debug(sprintf(
330  'Building permanent with parameters %s',
331  $forum_parameters
332  ));
333 
334  if ($this->isCronjob()) {
335  $posting_link = sprintf(
336  $language_text,
337  ilUtil::_getHttpPath() . "/goto.php?target=frm_" . $forum_parameters . '&client_id=' . CLIENT_ID
338  ) . "\n\n";
339 
340  $posting_link .= sprintf(
341  $this->getLanguageText("forums_notification_intro"),
342  $ilClientIniFile->readVariable("client", "name"),
343  ilUtil::_getHttpPath() . '/?client_id=' . CLIENT_ID
344  ) . "\n\n";
345  } else {
346  $posting_link = sprintf(
347  $language_text,
348  ilUtil::_getHttpPath() . "/goto.php?target=frm_" . $forum_parameters . '&client_id=' . CLIENT_ID
349  ) . "\n\n";
350 
351  $posting_link .= sprintf(
352  $this->getLanguageText("forums_notification_intro"),
353  $ilClientIniFile->readVariable("client", "name"),
354  ilUtil::_getHttpPath() . '/?client_id=' . CLIENT_ID
355  ) . "\n\n";
356  }
357 
358  $this->logger->debug(sprintf(
359  'Link built: %s',
360  $posting_link
361  ));
362 
363  return $posting_link;
364  }
static _getHttpPath()
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSecurePostMessage()

ilMailEventNotificationSender::getSecurePostMessage ( )
private
Returns
string

Definition at line 369 of file class.ilMailEventNotificationSender.php.

Referenced by createMailBodyText().

370  {
371  $pos_message = $this->provider->getPostMessage();
372  if (strip_tags($pos_message) != $pos_message) {
373  $pos_message = preg_replace("/\n/i", "", $pos_message);
374  $pos_message = preg_replace("/<li([^>]*)>/i", "\n<li$1>", $pos_message);
375  $pos_message = preg_replace("/<\/ul([^>]*)>(?!\s*?(<p|<ul))/i", "</ul$1>\n", $pos_message);
376  $pos_message = preg_replace("/<br(\s*)(\/?)>/i", "\n", $pos_message);
377  $pos_message = preg_replace("/<p([^>]*)>/i", "\n\n", $pos_message);
378  $pos_message = preg_replace("/<\/p([^>]*)>/i", '', $pos_message);
379 
380  return $pos_message;
381  }
382 
383  return strip_tags($pos_message);
384  }
+ Here is the caller graph for this function:

◆ initLanguage()

ilMailEventNotificationSender::initLanguage (   $a_usr_id)
protected
Parameters
int$a_usr_id

Definition at line 290 of file class.ilMailEventNotificationSender.php.

References language().

Referenced by send().

291  {
292  parent::initLanguage($a_usr_id);
293  $this->language->loadLanguageModule('forum');
294  }
language()
Definition: language.php:2
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initMail()

ilMailEventNotificationSender::initMail ( )
protected

Definition at line 59 of file class.ilMailEventNotificationSender.php.

References ilMailNotification\$mail.

Referenced by addMailSubject().

60  {
61  $mail = parent::initMail();
62  $this->logger->debug('Initialized mail service');
63 
64  return $mail;
65  }
+ Here is the caller graph for this function:

◆ isCronjob()

ilMailEventNotificationSender::isCronjob ( )
Returns
boolean

Definition at line 299 of file class.ilMailEventNotificationSender.php.

References $is_cronjob.

Referenced by getPermanentLink().

+ Here is the caller graph for this function:

◆ send()

ilMailEventNotificationSender::send ( )
Returns
bool
Exceptions
ilException

Definition at line 95 of file class.ilMailEventNotificationSender.php.

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

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

◆ sendMail()

ilMailEventNotificationSender::sendMail ( array  $a_rcp,
  $a_parse_recipients = true 
)

Definition at line 70 of file class.ilMailEventNotificationSender.php.

71  {
72  $this->logger->debug(sprintf(
73  'Delegating notification transport to mail service for recipient "%s" ...',
74  $a_rcp
75  ));
76  parent::sendMail($a_rcp, $a_parse_recipients);
77  $this->logger->debug('Notification transport delegated');
78  }

◆ setIsCronjob()

ilMailEventNotificationSender::setIsCronjob (   $is_cronjob)
Parameters
boolean$is_cronjob

Definition at line 307 of file class.ilMailEventNotificationSender.php.

References $is_cronjob.

308  {
309  $this->is_cronjob = (bool) $is_cronjob;
310  }

◆ setSubject()

ilMailEventNotificationSender::setSubject (   $a_subject)
protected

Definition at line 83 of file class.ilMailEventNotificationSender.php.

Referenced by addMailSubject().

84  {
85  $value = parent::setSubject($a_subject);
86  $this->logger->debug(sprintf('Setting subject to: %s', $a_subject));
87 
88  return $value;
89  }
+ Here is the caller graph for this function:

Field Documentation

◆ $is_cronjob

ilMailEventNotificationSender::$is_cronjob = false
protected

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

Referenced by isCronjob(), and setIsCronjob().

◆ $logger

ilMailEventNotificationSender::$logger
protected

Definition at line 42 of file class.ilMailEventNotificationSender.php.

Referenced by __construct().

◆ $provider

ilMailEventNotificationSender::$provider
protected

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

Referenced by __construct().

◆ PERMANENT_LINK_FORUM

const ilMailEventNotificationSender::PERMANENT_LINK_FORUM = 'PL_Forum'

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

◆ PERMANENT_LINK_POST

const ilMailEventNotificationSender::PERMANENT_LINK_POST = 'PL_Post'

Definition at line 25 of file class.ilMailEventNotificationSender.php.

◆ TYPE_POST_ACTIVATION

const ilMailEventNotificationSender::TYPE_POST_ACTIVATION = 61

Definition at line 13 of file class.ilMailEventNotificationSender.php.

◆ TYPE_POST_ANSWERED

const ilMailEventNotificationSender::TYPE_POST_ANSWERED = 65

Definition at line 21 of file class.ilMailEventNotificationSender.php.

◆ TYPE_POST_CENSORED

const ilMailEventNotificationSender::TYPE_POST_CENSORED = 63

Definition at line 17 of file class.ilMailEventNotificationSender.php.

◆ TYPE_POST_DELETED

const ilMailEventNotificationSender::TYPE_POST_DELETED = 64

Definition at line 19 of file class.ilMailEventNotificationSender.php.

◆ TYPE_POST_NEW

const ilMailEventNotificationSender::TYPE_POST_NEW = 60

Definition at line 11 of file class.ilMailEventNotificationSender.php.

◆ TYPE_POST_UNCENSORED

const ilMailEventNotificationSender::TYPE_POST_UNCENSORED = 66

Definition at line 23 of file class.ilMailEventNotificationSender.php.

◆ TYPE_POST_UPDATED

const ilMailEventNotificationSender::TYPE_POST_UPDATED = 62

Definition at line 15 of file class.ilMailEventNotificationSender.php.

◆ TYPE_THREAD_DELETED

const ilMailEventNotificationSender::TYPE_THREAD_DELETED = 54

Definition at line 9 of file class.ilMailEventNotificationSender.php.


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