ILIAS  release_7 Revision v7.30-3-g800a261c036
ilForumMailEventNotificationSender Class Reference
+ Inheritance diagram for ilForumMailEventNotificationSender:
+ Collaboration diagram for ilForumMailEventNotificationSender:

Public Member Functions

 __construct (ilForumNotificationMailData $provider, \ilLogger $logger)
 ilForumMailNotification constructor. More...
 
 sendMail (array $a_rcp, $a_parse_recipients=true)
 
Parameters
array$a_rcp
bool | true$a_parse_recipients
More...
 
 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 ()
 
Returns
ilMail
More...
 
 setSubject ($a_subject)
 
Parameters
string$a_subject
Returns
string body
More...
 
 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)
 
 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)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

ilForumMailNotification constructor.

Parameters
ilForumNotificationMailData$provider
ilLogger$logger

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

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

+ Here is the call graph for this function:

Member Function Documentation

◆ addMailSubject()

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

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

538 {
539 $body = $this->getPermanentLink();
541
542 return $body;
543 }
static _getInstallationSignature()

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

Referenced by createMailValueObjectsWithAttachments().

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

◆ createAttachmentText()

ilForumMailEventNotificationSender::createAttachmentText ( )
private

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

524 {
525 $attachmentText = '';
526 if (count($this->provider->getAttachments()) > 0) {
527 $this->logger->debug('Adding attachments ...');
528 foreach ($this->provider->getAttachments() as $attachment) {
529 $attachmentText .= $this->getLanguageText('attachment') . ": " . $attachment . "\n";
530 }
531 $attachmentText .= "\n------------------------------------------------------------\n";
532 }
533
534 return $attachmentText;
535 }

References ilMailNotification\getLanguageText().

Referenced by createMailValueObjectsWithAttachments().

+ 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 476 of file class.ilForumMailEventNotificationSender.php.

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 if ($this->provider->providesClosestContainer()) {
495 $body .= $this->getLanguageText('obj_' . $this->provider->closestContainer()->getType()) . ": " . $this->provider->closestContainer()->getTitle();
496 $body .= "\n\n";
497 }
498 $body .= $this->getLanguageText('thread') . ": " . $this->provider->getThreadTitle();
499 $body .= "\n\n";
500 $body .= $this->getLanguageText($action) . ": \n------------------------------------------------------------\n";
501
502 $body .= $this->getLanguageText('author') . ": " . $this->provider->getPostUserName($this->getLanguage());
503 $body .= "\n";
504 $body .= $this->getLanguageText('date') . ": " . $date;
505 $body .= "\n";
506 $body .= $this->getLanguageText('subject') . ": " . $this->provider->getPostTitle();
507 $body .= "\n";
508 $body .= $this->getLanguageText('frm_noti_message');
509 $body .= "\n";
510
511 $message = strip_tags($this->getPostMessage());
512
513 if ($this->provider->getPostCensored() == 1) {
514 $message = $this->provider->getCensorshipComment();
515 }
516
517 $body .= $message . "\n";
518 $body .= "------------------------------------------------------------\n";
519
520 return $body;
521 }
static getSalutation($a_usr_id, ilLanguage $a_language=null)
$message
Definition: xapiexit.php:14

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

Referenced by createMailValueObjectsWithAttachments(), and createMailValueObjectWithoutAttachments().

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

◆ createMailDate()

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

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

563 : string
564 {
566
567 if ($date === '') {
568 $date = $this->provider->getPostDate();
569 }
570
572
573 return $date;
574 }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
static setLanguage($a_lng)
set language
@classDescription Date and time handling
language()
Definition: language.php:2

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

Referenced by createMailBodyText().

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

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

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 }
createMailBodyText(string $subject, int $userId, string $customText, string $action, string $date)
static _lookupLogin($a_user_id)
lookup login

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

Referenced by send().

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

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

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 }

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

Referenced by send().

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

◆ createSubjectText()

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

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

580 : string
581 {
582 $container_text = '';
583 if ($this->provider->providesClosestContainer()) {
584 $container_text = " (" . $this->getLanguageText('frm_noti_obj_' . $this->provider->closestContainer()->getType()) .
585 " \"" . $this->provider->closestContainer()->getTitle() . "\")";
586 }
587
588 return sprintf(
590 $this->provider->getForumTitle(),
591 $container_text,
592 $this->provider->getThreadTitle()
593 );
594 }

References ilMailNotification\getLanguageText().

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

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

◆ getPermanentLink()

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

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

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()
const CLIENT_ID
Definition: constants.php:39
global $DIC
Definition: goto.php:24

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

Referenced by createAttachmentLinkText().

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

◆ getPostMessage()

ilForumMailEventNotificationSender::getPostMessage ( )
private
Returns
string

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

369 : string
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 $pos_message;
384 }

Referenced by createMailBodyText().

+ Here is the caller graph for this function:

◆ initLanguage()

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

Reimplemented from ilMailNotification.

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

291 {
292 parent::initLanguage($a_usr_id);
293 $this->language->loadLanguageModule('forum');
294 }

References language().

Referenced by send().

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

◆ initMail()

ilForumMailEventNotificationSender::initMail ( )
protected

Returns
ilMail

Reimplemented from ilMailNotification.

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

59 : ilMail
60 {
61 $mail = parent::initMail();
62 $this->logger->debug('Initialized mail service');
63
64 return $mail;
65 }

References ilMailNotification\$mail.

Referenced by addMailSubject().

+ Here is the caller graph for this function:

◆ isCronjob()

ilForumMailEventNotificationSender::isCronjob ( )
Returns
boolean

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

References $is_cronjob.

Referenced by getPermanentLink().

+ Here is the caller graph for this function:

◆ send()

ilForumMailEventNotificationSender::send ( )
Returns
bool
Exceptions
ilException

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

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()) {
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
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
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
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
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
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
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
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,
277 $contextId,
278 $contextParameters
279 );
280
283
284 return true;
285 }
static setUseRelativeDates($a_status)
set use relative dates
static useRelativeDates()
check if relative dates are used
createMailValueObjectsWithAttachments(string $subjectLanguageId, int $recipientUserId, string $customText, string $action, string $date='')
Add body and send mail with attachments.
createMailValueObjectWithoutAttachments(string $subjectLanguageId, int $recipientUserId, string $customText, string $action, string $date='')
Add body and send mail without attachments.
getType()
Get notification type.
getRecipients()
get array of recipients
const ANONYMOUS_USER_ID
Definition: constants.php:25
global $ilSetting
Definition: privfeed.php:17
$lng

References $DIC, $ilSetting, $lng, ANONYMOUS_USER_ID, createMailValueObjectsWithAttachments(), createMailValueObjectWithoutAttachments(), ilMailFormCall\getContextId(), ilMailFormCall\getContextParameters(), ilMailNotification\getLanguageText(), ilMailNotification\getRecipients(), ilMailNotification\getType(), initLanguage(), ilDatePresentation\setLanguage(), ilDatePresentation\setUseRelativeDates(), TYPE_POST_ACTIVATION, TYPE_POST_ANSWERED, TYPE_POST_CENSORED, TYPE_POST_DELETED, TYPE_POST_NEW, TYPE_POST_UNCENSORED, TYPE_POST_UPDATED, TYPE_THREAD_DELETED, and ilDatePresentation\useRelativeDates().

+ Here is the call graph for this function:

◆ sendMail()

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

Parameters
array$a_rcp
bool | true$a_parse_recipients

Reimplemented from ilMailNotification.

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

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

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

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

References $is_cronjob.

◆ setSubject()

ilForumMailEventNotificationSender::setSubject (   $a_subject)
protected

Parameters
string$a_subject
Returns
string body

Reimplemented from ilMailNotification.

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

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

Referenced by addMailSubject().

+ Here is the caller graph for this function:

Field Documentation

◆ $is_cronjob

ilForumMailEventNotificationSender::$is_cronjob = false
protected

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

Referenced by isCronjob(), and setIsCronjob().

◆ $logger

ilForumMailEventNotificationSender::$logger
protected

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

Referenced by __construct().

◆ $provider

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'

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

◆ PERMANENT_LINK_POST

const ilForumMailEventNotificationSender::PERMANENT_LINK_POST = 'PL_Post'

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

◆ TYPE_POST_ACTIVATION

const ilForumMailEventNotificationSender::TYPE_POST_ACTIVATION = 61

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

Referenced by send().

◆ TYPE_POST_ANSWERED

const ilForumMailEventNotificationSender::TYPE_POST_ANSWERED = 65

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

Referenced by send().

◆ TYPE_POST_CENSORED

const ilForumMailEventNotificationSender::TYPE_POST_CENSORED = 63

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

Referenced by send().

◆ TYPE_POST_DELETED

const ilForumMailEventNotificationSender::TYPE_POST_DELETED = 64

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

Referenced by send().

◆ TYPE_POST_NEW

const ilForumMailEventNotificationSender::TYPE_POST_NEW = 60

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

Referenced by send().

◆ TYPE_POST_UNCENSORED

const ilForumMailEventNotificationSender::TYPE_POST_UNCENSORED = 66

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

Referenced by send().

◆ TYPE_POST_UPDATED

const ilForumMailEventNotificationSender::TYPE_POST_UPDATED = 62

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

Referenced by send().

◆ TYPE_THREAD_DELETED

const ilForumMailEventNotificationSender::TYPE_THREAD_DELETED = 54

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

Referenced by send().


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