5 include_once
'./Services/Language/classes/class.ilLanguageFactory.php';
6 include_once
'./Services/Mail/classes/class.ilMail.php';
53 $this->is_in_wsp = (bool)$a_is_personal_workspace;
60 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
61 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
74 $this->type = $a_type;
93 $this->sender = $a_usr_id;
112 return $this->subject = $a_subject;
131 $this->body = $a_body;
141 return $this->body .= $a_body;
160 $this->recipients = $a_rcp;
178 $this->attachments = $a_att;
196 $this->lang_modules = $a_modules;
219 if(
sizeof($this->lang_modules))
221 foreach($this->lang_modules as $lmod)
237 $this->language->loadLanguageModule(
'mail');
239 if(
sizeof($this->lang_modules))
241 foreach($this->lang_modules as $lmod)
243 $this->language->loadLanguageModule($lmod);
254 $this->language = $a_language;
273 return str_replace(
'\n',
"\n", $this->
getLanguage()->txt($a_keyword));
283 if(!$this->is_in_wsp)
285 $this->ref_id = $a_id;
290 $this->ref_id = (int)$a_id;
321 $this->obj_id = $a_obj_id;
341 $this->additional_info = $a_info;
378 public function sendMail($a_rcp,$a_type,$a_parse_recipients =
true)
381 foreach($a_rcp as $rcp)
383 if($a_parse_recipients)
393 $error = $this->
getMail()->sendMail(
405 $GLOBALS[
'ilLog']->write(__METHOD__.
': '.$error);
424 return is_object($this->mail) ? $this->mail : $this->
initMail();
433 include_once
'./Services/Link/classes/class.ilLink.php';
437 if(!$this->is_in_wsp)
461 return ($name[
'title'] ? $name[
'title'].
' ' :
'').
462 ($name[
'firstname'] ? $name[
'firstname'].
' ' :
'').
463 ($name[
'lastname'] ? $name[
'lastname'].
' ' :
'');
480 if(!$this->is_in_wsp)
482 if(trim($a_permission) &&
483 !$ilAccess->checkAccessOfUser($a_user_id, $a_permission,
"", $a_ref_id, $this->getObjType()))
490 if(trim($a_permission) &&
491 !$this->wsp_access_handler->checkAccessOfUser($this->wsp_tree, $a_user_id, $a_permission,
"", $a_ref_id, $this->
getObjType()))
505 return "----------------------------------------\n";