ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilLMMailNotification Class Reference
+ Inheritance diagram for ilLMMailNotification:
+ Collaboration diagram for ilLMMailNotification:

Public Member Functions

 __construct ($a_is_personal_workspace=false)
 Constructor. More...
 
 setQuestionId ($a_val)
 Set question id. More...
 
 getQuestionId ()
 Get question id. More...
 
 send ()
 Send notifications. More...
 
- 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_USER_BLOCKED = 10
 
- Data Fields inherited from ilMailNotification
const SUBJECT_TITLE_LENGTH = 60
 

Protected Member Functions

 initLanguage ($a_usr_id)
 Init language. More...
 
- 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

 $user
 
- 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

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilLMMailNotification::__construct (   $a_is_personal_workspace = false)

Constructor.

Reimplemented from ilMailNotification.

Definition at line 22 of file class.ilLMMailNotification.php.

23 {
24 global $DIC;
25 parent::__construct($a_is_personal_workspace);
26
27 $this->user = $DIC->user();
28 }
user()
Definition: user.php:4
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ getQuestionId()

ilLMMailNotification::getQuestionId ( )

Get question id.

Returns
int question id

Definition at line 47 of file class.ilLMMailNotification.php.

48 {
49 return $this->question_id;
50 }

Referenced by send().

+ Here is the caller graph for this function:

◆ initLanguage()

ilLMMailNotification::initLanguage (   $a_usr_id)
protected

Init language.

Parameters
int$a_usr_iduser id

Reimplemented from ilMailNotification.

Definition at line 113 of file class.ilLMMailNotification.php.

114 {
115 parent::initLanguage($a_usr_id);
116 $this->getLanguage()->loadLanguageModule('content');
117 }

References ilMailNotification\getLanguage().

Referenced by send().

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

◆ send()

ilLMMailNotification::send ( )

Send notifications.

Returns

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

57 {
59
60 switch ($this->getType()) {
62
63 foreach ($this->getRecipients() as $rcp) {
64 $this->initLanguage($rcp);
65 $this->initMail();
66 $this->setSubject(
67 sprintf(
68 $this->getLanguageText('cont_user_blocked'),
69 $this->getObjectTitle(true)
70 )
71 );
72 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
73 $this->appendBody("\n\n");
74 $this->appendBody(
75 $this->getLanguageText('cont_user_blocked2')
76 );
77 $this->appendBody("\n");
78 $this->appendBody(
79 $this->getLanguageText('cont_user_blocked3') . " '" . $this->getLanguageText('objs_qst') . "' > '" . $this->getLanguageText('cont_blocked_users') . "'"
80 );
81 $this->appendBody("\n");
82 $this->appendBody(
83 $this->getLanguageText('obj_lm') . ": " . $this->getObjectTitle(true)
84 );
85 $this->appendBody("\n");
86 $this->appendBody(
87 $this->getLanguageText('user') . ": " . ilUserUtil::getNamePresentation($ilUser->getId(), false, false, "")
88 );
89 $this->appendBody("\n");
90
91 $this->appendBody(
92 $this->getLanguageText('question') . ": " . assQuestion::_getTitle($this->getQuestionId())
93 );
94 $this->appendBody("\n");
95 $this->appendBody("\n\n");
96 $this->appendBody($this->getLanguageText('cont_lm_mail_permanent_link'));
97 $this->appendBody("\n");
98 $this->appendBody($this->createPermanentLink(array(), ""));
99 $this->getMail()->appendInstallationSignature(true);
100 $this->sendMail(array($rcp));
101 }
102 break;
103
104 }
105 return true;
106 }
static _getTitle($a_q_id)
Returns the title of a question.
initLanguage($a_usr_id)
Init language.
appendBody($a_body)
Append body text.
getType()
Get notification type.
sendMail(array $a_rcp, $a_parse_recipients=true)
getRecipients()
get array of recipients
getObjectTitle($a_shorten=false)
createPermanentLink($a_params=array(), $a_append='')
static getSalutation($a_usr_id, ilLanguage $a_language=null)
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
$ilUser
Definition: imgupload.php:18

References $ilUser, $user, assQuestion\_getTitle(), ilMailNotification\appendBody(), ilMailNotification\createPermanentLink(), ilMailNotification\getLanguage(), ilMailNotification\getLanguageText(), ilMailNotification\getMail(), ilUserUtil\getNamePresentation(), ilMailNotification\getObjectTitle(), getQuestionId(), ilMailNotification\getRecipients(), ilMail\getSalutation(), ilMailNotification\getType(), initLanguage(), ilMailNotification\initMail(), ilMailNotification\sendMail(), ilMailNotification\setBody(), ilMailNotification\setSubject(), and TYPE_USER_BLOCKED.

+ Here is the call graph for this function:

◆ setQuestionId()

ilLMMailNotification::setQuestionId (   $a_val)

Set question id.

Parameters
int$a_valquestion id

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

38 {
39 $this->question_id = $a_val;
40 }

Field Documentation

◆ $user

ilLMMailNotification::$user
protected

Definition at line 16 of file class.ilLMMailNotification.php.

Referenced by send().

◆ TYPE_USER_BLOCKED

const ilLMMailNotification::TYPE_USER_BLOCKED = 10

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

Referenced by ilLMPageGUI\processAnswer(), and send().


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