3 declare(strict_types=1);
27 private \ilObjUser
$to;
28 private \ilObjUser
$cc;
50 public function send(): bool
52 $notif = new \ilSystemNotification();
53 $notif->setLangModules([
'etal',
'orgu']);
57 $notif->getUserLanguage($this->to->getId())->txt($this->message->getSubjectLangKey()),
61 $notif->setRefId($this->message->getTalkRefId());
63 $notif->setIntroductionLangId($this->message->getMessageLangKey());
65 $notif->addAdditionalInfo(
67 $this->message->getTalkName()
70 if ($this->message->getTalkDescription()) {
71 $notif->addAdditionalInfo(
73 $this->message->getTalkDescription()
77 if ($this->message->getTalkLocation()) {
78 $notif->addAdditionalInfo(
80 $this->message->getTalkLocation()
84 $notif->addAdditionalInfo(
86 $this->message->getNameOfSuperior()
89 $notif->addAdditionalInfo(
90 'notification_talks_date_list_header',
91 "- " . implode(
"\r\n- ", $this->message->getDates()),
95 if ($this->message->getAddGoto()) {
96 $notif->addAdditionalInfo(
102 $attachment_name =
'appointments.ics';
103 $attachment->storeAsAttachment(
114 $notif->composeAndGetMessage($this->to->getId(), null,
'',
true),
118 $attachment->unlinkFile(
'appointments.ics');
125 $message =
"--$mime_boundary\r\n";
126 $message .=
'Content-Type: text/calendar;name="appointment.ics";method=' . $this->
calendar->getMethod() .
"\r\n";
127 $message .=
"Content-Disposition: attachment;filename=\"appointment.ics\"\r\n";
128 $message .=
"Content-Transfer-Encoding: UTF8\r\n\r\n";
129 $message .= $this->
calendar->render() .
"\r\n";
136 $this->message->getTalkRefId() .
'&client_id=' .
CLIENT_ID;
send()
Send the notification.
__construct(EmployeeTalkEmailNotification $message, string $subject, \ilObjUser $to, \ilObjUser $cc, VCalender $calendar)
getIcalEvent(string $mime_boundary)
EmployeeTalkEmailNotification $message
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupLogin(int $a_user_id)