ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilCronDeleteInactiveUserReminderMailNotification Class Reference
+ Inheritance diagram for ilCronDeleteInactiveUserReminderMailNotification:
+ Collaboration diagram for ilCronDeleteInactiveUserReminderMailNotification:

Public Member Functions

 __construct ()
 Constructor. More...
 
 send ()
 
- Public Member Functions inherited from ilMimeMailNotification
 sendMimeMail ($a_rcp)
 
 setCurrentRecipient ($current_recipient)
 
 getCurrentRecipient ()
 
 setMimeMail ($mime_mail)
 
 getMimeMail ()
 
- 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_type, $a_parse_recipients=true)
 
 getBlockBorder ()
 Get (ascii) block border. More...
 

Protected Member Functions

 initLanguageByIso2Code ($a_code='')
 
- Protected Member Functions inherited from ilMimeMailNotification
 initLanguageByIso2Code ($a_code='')
 
 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...
 

Additional Inherited Members

- Data Fields inherited from ilMailNotification
const SUBJECT_TITLE_LENGTH = 60
 
- Protected Attributes inherited from ilMimeMailNotification
 $mime_mail
 
 $current_recipient
 
- 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
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilCronDeleteInactiveUserReminderMailNotification::__construct ( )

Constructor.

Definition at line 18 of file class.ilCronDeleteInactiveUserReminderMailNotification.php.

19  {
20  parent::__construct();
21  }

Member Function Documentation

◆ initLanguageByIso2Code()

ilCronDeleteInactiveUserReminderMailNotification::initLanguageByIso2Code (   $a_code = '')
protected
Parameters
string$a_code

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

References ilMailNotification\getLanguage().

Referenced by send().

27  {
28  parent::initLanguageByIso2Code($a_code);
29  $this->getLanguage()->loadLanguageModule('user');
30  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ send()

ilCronDeleteInactiveUserReminderMailNotification::send ( )

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

References ilMailNotification\$body, $lng, ilMailNotification\appendBody(), ilDatePresentation\formatDate(), ilMailNotification\getAdditionalInformation(), ilMimeMailNotification\getCurrentRecipient(), ilMailNotification\getLanguage(), ilMailNotification\getRecipients(), IL_CAL_UNIX, initLanguageByIso2Code(), ilMimeMailNotification\sendMimeMail(), ilDatePresentation\setLanguage(), ilMailNotification\setSubject(), ilDatePresentation\setUseRelativeDates(), and ilDatePresentation\useRelativeDates().

33  {
34  global $lng;
35 
36  $additional_information = $this->getAdditionalInformation();
37 
40 
41  foreach($this->getRecipients() as $rcp)
42  {
43  try
44  {
45  $this->handleCurrentRecipient($rcp);
46  }
47  catch(ilMailException $e)
48  {
49  continue;
50  }
51 
52  $this->initMimeMail();
53  $this->initLanguageByIso2Code();
54 
56  $date_for_deletion = ilDatePresentation::formatDate(new ilDate($additional_information["date"], IL_CAL_UNIX));
57 
58  $this->setSubject($this->getLanguage()->txt('del_mail_subject'));
59  $body = sprintf($this->getLanguage()->txt("del_mail_body"), $rcp->fullname,"\n\n",$additional_information["www"], $date_for_deletion);
60  $this->appendBody($body);
61  $this->appendBody(ilMail::_getInstallationSignature());
62  $this->sendMimeMail($this->getCurrentRecipient());
63  }
64 
67  }
Class ilMailException.
static setUseRelativeDates($a_status)
set use relative dates
const IL_CAL_UNIX
static useRelativeDates()
check if relative dates are used
static setLanguage($a_lng)
set language
Class for single dates.
static formatDate(ilDateTime $date)
Format a date public.
getRecipients()
get array of recipients
global $lng
Definition: privfeed.php:17
appendBody($a_body)
Append body text.
+ Here is the call graph for this function:

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