diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-09-30 14:12:09 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-10-15 22:06:18 +0300 |
commit | bc495aff638f532870575f8646fe4ad14375183c (patch) | |
tree | a3f40f711f08c4a75d83b133e466a768a3b875f7 /lib/Model | |
parent | 1e490ce8327ab56bd2d0e7802a1c292b50e619a5 (diff) |
Add CKEditor
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Model')
-rw-r--r-- | lib/Model/NewMessageData.php | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/Model/NewMessageData.php b/lib/Model/NewMessageData.php index 5571b9b26..882943d39 100644 --- a/lib/Model/NewMessageData.php +++ b/lib/Model/NewMessageData.php @@ -53,6 +53,9 @@ class NewMessageData { /** @var array */ private $attachments; + /** @var bool */ + private $isHtml; + /** * @param Account $account * @param AddressList $to @@ -61,14 +64,16 @@ class NewMessageData { * @param string $subject * @param string|null $body * @param array $attachments + * @package bool $isHtml */ public function __construct(Account $account, AddressList $to, AddressList $cc, AddressList $bcc, string $subject, - string $body = null , - array $attachments = []) { + string $body = null, + array $attachments = [], + bool $isHtml = true) { $this->account = $account; $this->to = $to; $this->cc = $cc; @@ -76,6 +81,7 @@ class NewMessageData { $this->subject = $subject; $this->body = $body; $this->attachments = $attachments; + $this->isHtml = $isHtml; } /** @@ -86,6 +92,7 @@ class NewMessageData { * @param string $subject * @param string $body * @param array|null $attachments + * * @return NewMessageData */ public static function fromRequest(Account $account, @@ -94,13 +101,14 @@ class NewMessageData { string $bcc = null, string $subject, string $body = null, - array $attachments = []) { + array $attachments = [], + bool $isHtml = true) { $toList = AddressList::parse($to ?: ''); $ccList = AddressList::parse($cc ?: ''); $bccList = AddressList::parse($bcc ?: ''); $attachmentsArray = $attachments === null ? [] : $attachments; - return new self($account, $toList, $ccList, $bccList, $subject, $body, $attachmentsArray); + return new self($account, $toList, $ccList, $bccList, $subject, $body, $attachmentsArray, $isHtml); } /** @@ -152,4 +160,8 @@ class NewMessageData { return $this->attachments; } + public function isHtml(): bool { + return $this->isHtml; + } + } |