Completed
Push — master ( c28fba...9b84d0 )
by Tim
15s queued 11s
created

BaseSlugGenerationEvent::getModel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace HDNET\Calendarize\Event;
6
7
use TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface;
8
9
final class BaseSlugGenerationEvent
10
{
11
    /**
12
     * @var string
13
     */
14
    private $uniqueRegisterKey;
15
16
    /**
17
     * @var DomainObjectInterface|null
18
     */
19
    private $model;
20
21
    /**
22
     * @var array
23
     */
24
    private $record;
25
26
    /**
27
     * @var string
28
     */
29
    private $baseSlug;
30
31
    /**
32
     * BaseSlugGenerationEvent constructor.
33
     *
34
     * @param string                $uniqueRegisterKey
35
     * @param DomainObjectInterface $model
36
     * @param array                 $record
37
     * @param string                $baseSlug
38
     */
39
    public function __construct(
40
        string $uniqueRegisterKey,
41
        DomainObjectInterface $model,
42
        array $record,
43
        string $baseSlug
44
    ) {
45
        $this->uniqueRegisterKey = $uniqueRegisterKey;
46
        $this->model = $model;
47
        $this->record = $record;
48
        $this->baseSlug = $baseSlug;
49
    }
50
51
    /**
52
     * @return string
53
     */
54
    public function getBaseSlug(): string
55
    {
56
        return $this->baseSlug;
57
    }
58
59
    /**
60
     * @param string $baseSlug
61
     */
62
    public function setBaseSlug(string $baseSlug): void
63
    {
64
        $this->baseSlug = $baseSlug;
65
    }
66
67
    /**
68
     * @return DomainObjectInterface|null
69
     */
70
    public function getModel(): ?DomainObjectInterface
71
    {
72
        return $this->model;
73
    }
74
75
    /**
76
     * @return string
77
     */
78
    public function getUniqueRegisterKey(): string
79
    {
80
        return $this->uniqueRegisterKey;
81
    }
82
83
    /**
84
     * @return array
85
     */
86
    public function getRecord(): array
87
    {
88
        return $this->record;
89
    }
90
}
91