Passed
Pull Request — dev (#35)
by Romain
03:52
created

EntityEmailNotification::setSendBcc()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * Copyright (C) 2017
5
 * Nathan Boiron <[email protected]>
6
 * Romain Canon <[email protected]>
7
 *
8
 * This file is part of the TYPO3 NotiZ project.
9
 * It is free software; you can redistribute it and/or modify it
10
 * under the terms of the GNU General Public License, either
11
 * version 3 of the License, or any later version.
12
 *
13
 * For the full copyright and license information, see:
14
 * http://www.gnu.org/licenses/gpl-3.0.html
15
 */
16
17
namespace CuyZ\Notiz\Domain\Notification\Email\Application\EntityEmail;
18
19
use CuyZ\Notiz\Domain\Notification\Email\Application\EntityEmail\Processor\EntityEmailNotificationProcessor;
20
use CuyZ\Notiz\Domain\Notification\Email\Application\EntityEmail\Settings\EntityEmailSettings;
21
use CuyZ\Notiz\Domain\Notification\Email\EmailNotification;
22
use CuyZ\Notiz\Domain\Notification\EntityNotification;
23
use CuyZ\Notiz\Notification\CustomSettingsNotification;
24
use TYPO3\CMS\Core\Utility\GeneralUtility;
25
use TYPO3\CMS\Extbase\Service\FlexFormService;
26
27
class EntityEmailNotification extends EntityNotification implements EmailNotification, CustomSettingsNotification
28
{
29
    /**
30
     * @var string
31
     */
32
    protected $title;
33
34
    /**
35
     * @var string
36
     */
37
    protected $event;
38
39
    /**
40
     * @var string
41
     */
42
    protected $layout;
43
44
    /**
45
     * @var string
46
     */
47
    protected $sender;
48
49
    /**
50
     * @var bool
51
     */
52
    protected $senderCustom;
53
54
    /**
55
     * @var string
56
     */
57
    protected $sendTo;
58
59
    /**
60
     * @var string
61
     */
62
    protected $sendToProvided;
63
64
    /**
65
     * @var string
66
     */
67
    protected $sendCc;
68
69
    /**
70
     * @var string
71
     */
72
    protected $sendCcProvided;
73
74
    /**
75
     * @var string
76
     */
77
    protected $sendBcc;
78
79
    /**
80
     * @var string
81
     */
82
    protected $sendBccProvided;
83
84
    /**
85
     * @var string
86
     */
87
    protected $subject;
88
89
    /**
90
     * @var string
91
     */
92
    protected $body;
93
94
    /**
95
     * @var array
96
     */
97
    protected $bodySlots = [];
98
99
    /**
100
     * @return string
101
     */
102
    public function getTitle()
103
    {
104
        return $this->title;
105
    }
106
107
    /**
108
     * @param string $title
109
     */
110
    public function setTitle($title)
111
    {
112
        $this->title = $title;
113
    }
114
115
    /**
116
     * @return string
117
     */
118
    public function getEvent()
119
    {
120
        return $this->event;
121
    }
122
123
    /**
124
     * @param string $event
125
     */
126
    public function setEvent($event)
127
    {
128
        $this->event = $event;
129
    }
130
131
    /**
132
     * @return string
133
     */
134
    public function getLayout()
135
    {
136
        return $this->layout;
137
    }
138
139
    /**
140
     * @param string $layout
141
     */
142
    public function setLayout($layout)
143
    {
144
        $this->layout = $layout;
145
    }
146
147
    /**
148
     * @return string
149
     */
150
    public function getSender()
151
    {
152
        return $this->sender;
153
    }
154
155
    /**
156
     * @param string $sender
157
     */
158
    public function setSender($sender)
159
    {
160
        $this->sender = $sender;
161
    }
162
163
    /**
164
     * @return bool
165
     */
166
    public function isSenderCustom()
167
    {
168
        return $this->senderCustom;
169
    }
170
171
    /**
172
     * @param bool $senderCustom
173
     */
174
    public function setSenderCustom($senderCustom)
175
    {
176
        $this->senderCustom = $senderCustom;
177
    }
178
179
    /**
180
     * @return string
181
     */
182
    public function getSendTo()
183
    {
184
        return $this->sendTo;
185
    }
186
187
    /**
188
     * @param string $sendTo
189
     */
190
    public function setSendTo($sendTo)
191
    {
192
        $this->sendTo = $sendTo;
193
    }
194
195
    /**
196
     * @return string
197
     */
198
    public function getSendToProvided()
199
    {
200
        return $this->sendToProvided;
201
    }
202
203
    /**
204
     * @param string $sendToProvided
205
     */
206
    public function setSendToProvided($sendToProvided)
207
    {
208
        $this->sendToProvided = $sendToProvided;
209
    }
210
211
    /**
212
     * @return string
213
     */
214
    public function getSendCc()
215
    {
216
        return $this->sendCc;
217
    }
218
219
    /**
220
     * @param string $sendCc
221
     */
222
    public function setSendCc($sendCc)
223
    {
224
        $this->sendCc = $sendCc;
225
    }
226
227
    /**
228
     * @return string
229
     */
230
    public function getSendCcProvided()
231
    {
232
        return $this->sendCcProvided;
233
    }
234
235
    /**
236
     * @param string $sendCcProvided
237
     */
238
    public function setSendCcProvided($sendCcProvided)
239
    {
240
        $this->sendCcProvided = $sendCcProvided;
241
    }
242
243
    /**
244
     * @return string
245
     */
246
    public function getSendBcc()
247
    {
248
        return $this->sendBcc;
249
    }
250
251
    /**
252
     * @param string $sendBcc
253
     */
254
    public function setSendBcc($sendBcc)
255
    {
256
        $this->sendBcc = $sendBcc;
257
    }
258
259
    /**
260
     * @return string
261
     */
262
    public function getSendBccProvided()
263
    {
264
        return $this->sendBccProvided;
265
    }
266
267
    /**
268
     * @param string $sendBccProvided
269
     */
270
    public function setSendBccProvided($sendBccProvided)
271
    {
272
        $this->sendBccProvided = $sendBccProvided;
273
    }
274
275
    /**
276
     * @return string
277
     */
278
    public function getSubject()
279
    {
280
        return $this->subject;
281
    }
282
283
    /**
284
     * @param string $subject
285
     */
286
    public function setSubject($subject)
287
    {
288
        $this->subject = $subject;
289
    }
290
291
    /**
292
     * @return string
293
     */
294
    public function getBody()
295
    {
296
        return $this->body;
297
    }
298
299
    /**
300
     * @return array
301
     */
302
    public function getBodySlots()
303
    {
304
        if (empty($this->bodySlots)) {
305
            /** @var FlexFormService $flexFormService */
306
            $flexFormService = GeneralUtility::makeInstance(FlexFormService::class);
307
308
            $this->bodySlots = $flexFormService->convertFlexFormContentToArray($this->body);
309
        }
310
311
        return $this->bodySlots;
312
    }
313
314
    /**
315
     * @param string $body
316
     */
317
    public function setBody($body)
318
    {
319
        $this->body = $body;
320
    }
321
322
    /**
323
     * @return string
324
     */
325
    public static function getProcessorClassName()
326
    {
327
        return EntityEmailNotificationProcessor::class;
328
    }
329
330
    /**
331
     * @return string
332
     */
333
    public static function getSettingsClassName()
334
    {
335
        return EntityEmailSettings::class;
336
    }
337
}
338