Passed
Push — develop ( d71986...e47c87 )
by Torben
13:09
created

ModifyUserMessageAttachmentsEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
c 0
b 0
f 0
nc 1
nop 5
dl 0
loc 7
rs 10
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\Registration;
15
use DERHANSEN\SfEventMgt\Service\NotificationService;
16
17
/**
18
 * This event should be used to modify the attachments of a user message. Use the $type variable to distinguish
19
 * between the different types of messages
20
 */
21
final class ModifyUserMessageAttachmentsEvent
22
{
23
    public function __construct(
24
        private array $attachments,
25
        private readonly Registration $registration,
26
        private readonly int $type,
27
        private readonly array $settings,
28
        private readonly NotificationService $notificationService
29
    ) {
30
    }
31
32
    public function getAttachments(): array
33
    {
34
        return $this->attachments;
35
    }
36
37
    public function getRegistration(): Registration
38
    {
39
        return $this->registration;
40
    }
41
42
    public function getType(): int
43
    {
44
        return $this->type;
45
    }
46
47
    public function getSettings(): array
48
    {
49
        return $this->settings;
50
    }
51
52
    public function getNotificationService(): NotificationService
53
    {
54
        return $this->notificationService;
55
    }
56
57
    public function setAttachments(array $attachments): void
58
    {
59
        $this->attachments = $attachments;
60
    }
61
}
62