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;
56 if ($this->is_in_wsp) {
57 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
58 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
88 $this->sender = $a_usr_id;
106 return $this->subject = $a_subject;
122 $this->body = $a_body;
132 return $this->body .= $a_body;
148 $this->recipients = $a_rcp;
166 $this->attachments = $a_att;
184 $this->lang_modules = $a_modules;
207 if (
sizeof($this->lang_modules)) {
208 foreach ($this->lang_modules as $lmod) {
223 $this->
language->loadLanguageModule(
'mail');
225 if (
sizeof($this->lang_modules)) {
226 foreach ($this->lang_modules as $lmod) {
227 $this->
language->loadLanguageModule($lmod);
254 return str_replace(
'\n',
"\n", $this->
getLanguage()->txt($a_keyword));
262 if (!$this->is_in_wsp) {
263 $this->ref_id = $a_id;
266 $this->ref_id = (int) $a_id;
294 $this->obj_id = $a_obj_id;
313 $this->additional_info = $a_info;
334 if ((
bool) $a_shorten) {
348 foreach ($a_rcp as $rcp) {
349 if ($a_parse_recipients) {
367 require_once
'./Services/Logging/classes/public/class.ilLoggerFactory.php';
396 include_once
'./Services/Link/classes/class.ilLink.php';
399 if (!$this->is_in_wsp) {
417 return (
$name[
'title'] ?
$name[
'title'] .
' ' :
'') .
418 ($name[
'firstname'] ? $name[
'firstname'] .
' ' :
'') .
419 ($name[
'lastname'] ? $name[
'lastname'] .
' ' :
'');
436 if (!$this->is_in_wsp) {
437 if (trim($a_permission) &&
438 !$DIC->access()->checkAccessOfUser($a_user_id, $a_permission,
"", $a_ref_id, $this->
getObjType())) {
442 if (trim($a_permission) &&
443 !$this->wsp_access_handler->checkAccessOfUser($this->wsp_tree, $a_user_id, $a_permission,
"", $a_ref_id, $this->
getObjType())) {
456 return "----------------------------------------\n";
static _lookupLogin($a_user_id)
lookup login
static _lookupName($a_user_id)
lookup user name
getType()
Get notification type.
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
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 _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.
static _lookupObjId($a_id)
getObjectTitle($a_shorten=false)
getAttachments()
Get attachments.
getObjType()
Get object type.
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="")