Completed
Push — typo3-10-compatibility ( b4f2e1...42d8ec )
by Torben
03:17
created

ModifyCreateDependingRegistrationsEvent   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 59
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getRegistration() 0 4 1
A getEventController() 0 4 1
A getCreateDependingRegistrations() 0 4 1
A setCreateDependingRegistrations() 0 4 1
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\Controller\EventController;
13
use DERHANSEN\SfEventMgt\Domain\Model\Registration;
14
15
/**
16
 * This event is triggered before depending registrations are created. Use setCreateDependingRegistrations to
17
 * override the original bahavior
18
 */
19
final class ModifyCreateDependingRegistrationsEvent
20
{
21
    /**
22
     * @var Registration
23
     */
24
    private $registration;
25
26
    /**
27
     * @var bool
28
     */
29
    private $createDependingRegistrations;
30
31
    /**
32
     * @var EventController
33
     */
34
    private $eventController;
35
36
    public function __construct(
37
        Registration $registration,
38
        bool $createDependingRegistrations,
39
        EventController $eventController
40
    ) {
41
        $this->registration = $registration;
42
        $this->createDependingRegistrations = $createDependingRegistrations;
43
        $this->eventController = $eventController;
44
    }
45
46
    /**
47
     * @return Registration
48
     */
49
    public function getRegistration(): Registration
50
    {
51
        return $this->registration;
52
    }
53
54
    /**
55
     * @return EventController
56
     */
57
    public function getEventController(): EventController
58
    {
59
        return $this->eventController;
60
    }
61
62
    /**
63
     * @return bool
64
     */
65
    public function getCreateDependingRegistrations(): bool
66
    {
67
        return $this->createDependingRegistrations;
68
    }
69
70
    /**
71
     * @param bool $createDependingRegistrations
72
     */
73
    public function setCreateDependingRegistrations(bool $createDependingRegistrations): void
74
    {
75
        $this->createDependingRegistrations = $createDependingRegistrations;
76
    }
77
}
78