5 include_once
'./Services/Language/classes/class.ilLanguageFactory.php';
6 include_once
'./Services/Mail/classes/class.ilMail.php';
51 $this->is_in_wsp = (bool)$a_is_personal_workspace;
58 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
59 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
89 $this->sender = $a_usr_id;
107 return $this->subject = $a_subject;
123 $this->body = $a_body;
133 return $this->body .= $a_body;
149 $this->recipients = $a_rcp;
167 $this->attachments = $a_att;
185 $this->lang_modules = $a_modules;
208 if(
sizeof($this->lang_modules))
210 foreach($this->lang_modules as $lmod)
226 $this->
language->loadLanguageModule(
'mail');
228 if(
sizeof($this->lang_modules))
230 foreach($this->lang_modules as $lmod)
232 $this->
language->loadLanguageModule($lmod);
259 return str_replace(
'\n',
"\n", $this->
getLanguage()->txt($a_keyword));
267 if(!$this->is_in_wsp)
269 $this->ref_id = $a_id;
274 $this->ref_id = (int)$a_id;
302 $this->obj_id = $a_obj_id;
321 $this->additional_info = $a_info;
358 foreach($a_rcp as $rcp)
360 if($a_parse_recipients)
382 require_once
'./Services/Logging/classes/public/class.ilLoggerFactory.php';
411 include_once
'./Services/Link/classes/class.ilLink.php';
415 if(!$this->is_in_wsp)
438 return ($name[
'title'] ? $name[
'title'].
' ' :
'').
439 ($name[
'firstname'] ? $name[
'firstname'].
' ' :
'').
440 ($name[
'lastname'] ? $name[
'lastname'].
' ' :
'');
457 if(!$this->is_in_wsp)
459 if(trim($a_permission) &&
460 !$ilAccess->checkAccessOfUser($a_user_id, $a_permission,
"", $a_ref_id, $this->getObjType()))
467 if(trim($a_permission) &&
468 !$this->wsp_access_handler->checkAccessOfUser($this->wsp_tree, $a_user_id, $a_permission,
"", $a_ref_id, $this->
getObjType()))
482 return "----------------------------------------\n";
static _lookupLogin($a_user_id)
lookup login
static _lookupName($a_user_id)
lookup user name
getType()
Get notification type.
initLanguageByIso2Code($a_code='')
Init language by ISO2 code.
getLanguageText($a_keyword)
setSender($a_usr_id)
Set sender of mail.
initLanguage($a_usr_id)
Init language.
setAttachments($a_att)
Set attachments.
isRefIdAccessible($a_user_id, $a_ref_id, $a_permission="read")
Check if ref id is accessible for user.
Access handler for personal workspace.
static shortenText($a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
static _lookupTitle($a_id)
lookup object title
mail($to, $subject, $message, $additional_headers=null, $additional_parameters=null)
const SUBJECT_TITLE_LENGTH
Tree handler for personal workspace.
getAdditionalInformation()
__construct($a_is_personal_workspace=false)
static _getLanguage($a_lang_key='')
Get langauge object.
Base class for course/group mail notifications.
setType($a_type)
Set notification type.
static getGotoLink($a_node_id, $a_obj_id, $a_additional=null)
setLangModules(array $a_modules)
Set lang modules.
This class handles base functions for mail handling.
static _lookupObjId($a_id)
getObjectTitle($a_shorten=false)
getAttachments()
Get attachments.
getObjType()
Get object type.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
sendMail(array $a_rcp, $a_type, $a_parse_recipients=true)
static _getLanguageOfUser($a_usr_id)
Get language object of user.
getRecipients()
get array of recipients
setRecipients(array $a_rcp)
getBlockBorder()
Get (ascii) block border.
createPermanentLink($a_params=array(), $a_append='')
getSender()
get sender of mail
appendBody($a_body)
Append body text.
static getLogger($a_component_id)
Get component logger.
getUserLanguage($a_usr_id)
Get user language.
setAdditionalInformation(array $a_info)
Additional information for creating notification mails.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")