1
|
|
|
<?php |
2
|
|
|
declare(strict_types = 1); |
3
|
|
|
namespace DERHANSEN\SfEventMgt\Event; |
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
|
|
|
use DERHANSEN\SfEventMgt\Domain\Model\Registration; |
13
|
|
|
use DERHANSEN\SfEventMgt\Service\NotificationService; |
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* This event is triggered after a admin message has been sent |
17
|
|
|
*/ |
18
|
|
|
final class AfterAdminMessageSentEvent |
19
|
|
|
{ |
20
|
|
|
/** |
21
|
|
|
* @var Registration |
22
|
|
|
*/ |
23
|
|
|
private $registration; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* @var string |
27
|
|
|
*/ |
28
|
|
|
private $body; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @var string |
32
|
|
|
*/ |
33
|
|
|
private $subject; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @var array |
37
|
|
|
*/ |
38
|
|
|
private $attachments; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @var string |
42
|
|
|
*/ |
43
|
|
|
private $senderName; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @var string |
47
|
|
|
*/ |
48
|
|
|
private $senderEmail; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @var NotificationService |
52
|
|
|
*/ |
53
|
|
|
private $notificationService; |
54
|
|
|
|
55
|
|
|
public function __construct( |
56
|
|
|
Registration $registration, |
57
|
|
|
string $body, |
58
|
|
|
string $subject, |
59
|
|
|
array $attachments, |
60
|
|
|
string $senderName, |
61
|
|
|
string $senderEmail, |
62
|
|
|
NotificationService $notificationService |
63
|
|
|
) { |
64
|
|
|
$this->registration = $registration; |
65
|
|
|
$this->body = $body; |
66
|
|
|
$this->subject = $subject; |
67
|
|
|
$this->attachments = $attachments; |
68
|
|
|
$this->senderName = $senderName; |
69
|
|
|
$this->senderEmail = $senderEmail; |
70
|
|
|
$this->notificationService = $notificationService; |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* @return Registration |
75
|
|
|
*/ |
76
|
|
|
public function getRegistration(): Registration |
77
|
|
|
{ |
78
|
|
|
return $this->registration; |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* @return string |
83
|
|
|
*/ |
84
|
|
|
public function getBody(): string |
85
|
|
|
{ |
86
|
|
|
return $this->body; |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* @return string |
91
|
|
|
*/ |
92
|
|
|
public function getSubject(): string |
93
|
|
|
{ |
94
|
|
|
return $this->subject; |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* @return array |
99
|
|
|
*/ |
100
|
|
|
public function getAttachments(): array |
101
|
|
|
{ |
102
|
|
|
return $this->attachments; |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* @return string |
107
|
|
|
*/ |
108
|
|
|
public function getSenderName(): string |
109
|
|
|
{ |
110
|
|
|
return $this->senderName; |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* @return string |
115
|
|
|
*/ |
116
|
|
|
public function getSenderEmail(): string |
117
|
|
|
{ |
118
|
|
|
return $this->senderEmail; |
119
|
|
|
} |
120
|
|
|
|
121
|
|
|
/** |
122
|
|
|
* @return NotificationService |
123
|
|
|
*/ |
124
|
|
|
public function getNotificationService(): NotificationService |
125
|
|
|
{ |
126
|
|
|
return $this->notificationService; |
127
|
|
|
} |
128
|
|
|
} |
129
|
|
|
|