Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
sendercancelinvitation.php
1<?php
2
3
5
6
11
13{
14 public const METHOD = 'cancel';
15
20 protected function getContent(): array
21 {
22 $attachmentManager = new AttachmentCancelManager($this->event);
23 $this->uid = $attachmentManager->getUid();
24
25 if (!$this->uid)
26 {
27 return [];
28 }
29
30 return [[
31 'CONTENT' => Encoding::convertEncoding($attachmentManager->getContent(), SITE_CHARSET, "utf-8"),
32 'CONTENT_TYPE' => self::CONTENT_TYPE,
33 'METHOD' => mb_strtolower(self::METHOD),
34 'CHARSET' => self::CHARSET,
35 'NAME' => self::ATTACHMENT_NAME,
36 'ID' => Helper::getUniqId(),
37 ]];
38 }
39
44 protected function getMailEventField(): array
45 {
46 $this->event['SKIP_TIME'] ??= null;
47 return [
48 "=Reply-To" => "{$this->context->getAddresser()->getFullName()} <{$this->context->getAddresser()->getEmail()}>",
49 "=From" => "{$this->context->getAddresser()->getFullName()} <{$this->context->getAddresser()->getEmail()}>",
50 "=Message-Id" => $this->getMessageId(),
51 "=In-Reply-To" => $this->getMessageReplyTo(),
52 'EMAIL_FROM' => $this->context->getAddresser()->getEmail(),
53 'EMAIL_TO' => $this->context->getReceiver()->getEmail(),
54 'MESSAGE_SUBJECT' => $this->getSubjectMessage(),
55 'MESSAGE_PHP' => $this->getBodyMessage(),
56 'CONFIRM_CODE' => 'TRUE',
57 'NAME' => $this->event['NAME'],
58 'METHOD' => self::METHOD,
59 'DATE_FROM' => $this->event['DATE_FROM'],
60 'DATE_TO' => $this->event['DATE_TO'],
61 'TZ_FROM' => $this->event['TZ_FROM'],
62 'TZ_TO' => $this->event['TZ_TO'],
63 'FULL_DAY' => $this->event['SKIP_TIME'] ? 'Y' : 'N',
64 ];
65 }
66
70 protected function getMessageReplyTo(): string
71 {
72 return $this->getMessageId();
73 }
74
78 protected function getSubjectTitle(): string
79 {
80 if (Loader::includeModule('bitrix24') && \CBitrix24::isFreeLicense())
81 {
82 return Loc::getMessage("EC_CALENDAR_ICAL_MAIL_METHOD_CANCEL");
83 }
84
85 return Loc::getMessage("EC_CALENDAR_ICAL_MAIL_METHOD_CANCEL") . ": {$this->event['NAME']}";
86 }
87
92 {
93 }
94}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29