|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
/* |
|
6
|
|
|
* This file is part of the Extension "sf_event_mgt" for TYPO3 CMS. |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please read the |
|
9
|
|
|
* LICENSE.txt file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace DERHANSEN\SfEventMgt\Event; |
|
13
|
|
|
|
|
14
|
|
|
use DERHANSEN\SfEventMgt\Domain\Model\Dto\CustomNotification; |
|
15
|
|
|
use DERHANSEN\SfEventMgt\Domain\Model\Registration; |
|
16
|
|
|
use DERHANSEN\SfEventMgt\Service\NotificationService; |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* This event should be used to modify the attachments of a user message. Use the $type variable to distinguish |
|
20
|
|
|
* between the different types of messages |
|
21
|
|
|
*/ |
|
22
|
|
|
final class ModifyUserMessageAttachmentsEvent |
|
23
|
|
|
{ |
|
24
|
|
|
public function __construct( |
|
25
|
|
|
private array $attachments, |
|
26
|
|
|
private readonly Registration $registration, |
|
27
|
|
|
private readonly int $type, |
|
28
|
|
|
private readonly array $settings, |
|
29
|
|
|
private readonly ?CustomNotification $customNotification, |
|
30
|
|
|
private readonly NotificationService $notificationService |
|
31
|
|
|
) { |
|
32
|
|
|
} |
|
33
|
|
|
|
|
34
|
|
|
public function getAttachments(): array |
|
35
|
|
|
{ |
|
36
|
|
|
return $this->attachments; |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
public function getRegistration(): Registration |
|
40
|
|
|
{ |
|
41
|
|
|
return $this->registration; |
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
public function getType(): int |
|
45
|
|
|
{ |
|
46
|
|
|
return $this->type; |
|
47
|
|
|
} |
|
48
|
|
|
|
|
49
|
|
|
public function getSettings(): array |
|
50
|
|
|
{ |
|
51
|
|
|
return $this->settings; |
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
public function getCustomNotification(): ?CustomNotification |
|
55
|
|
|
{ |
|
56
|
|
|
return $this->customNotification; |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
public function getNotificationService(): NotificationService |
|
60
|
|
|
{ |
|
61
|
|
|
return $this->notificationService; |
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
public function setAttachments(array $attachments): void |
|
65
|
|
|
{ |
|
66
|
|
|
$this->attachments = $attachments; |
|
67
|
|
|
} |
|
68
|
|
|
} |
|
69
|
|
|
|