Completed
Push — master ( efcf22...96508c )
by Axel
08:26 queued 02:37
created

AbstractRoutePreUpdateEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 40
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getRoute() 0 3 1
A getEntityChangeSet() 0 3 1
A __construct() 0 4 1
A setEntityChangeSet() 0 3 1
1
<?php
2
3
/**
4
 * Routes.
5
 *
6
 * @copyright Zikula contributors (Zikula)
7
 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
8
 * @author Zikula contributors <[email protected]>.
9
 * @see https://ziku.la
10
 * @version Generated by ModuleStudio 1.4.0 (https://modulestudio.de).
11
 */
12
13
declare(strict_types=1);
14
15
namespace Zikula\RoutesModule\Event\Base;
16
17
use Zikula\RoutesModule\Entity\RouteEntity;
18
19
/**
20
 * Event base class for filtering route processing.
21
 */
22
class AbstractRoutePreUpdateEvent
23
{
24
    /**
25
     * @var RouteEntity Reference to treated entity instance.
26
     */
27
    protected $route;
28
29
    /**
30
     * @var array Entity change set for preUpdate events.
31
     */
32
    protected $entityChangeSet = [];
33
34
    public function __construct(RouteEntity $route, array $entityChangeSet = [])
35
    {
36
        $this->route = $route;
37
        $this->entityChangeSet = $entityChangeSet;
38
    }
39
40
    /**
41
     * @return RouteEntity
42
     */
43
    public function getRoute(): RouteEntity
44
    {
45
        return $this->route;
46
    }
47
48
    /**
49
     * @return array Entity change set
50
     */
51
    public function getEntityChangeSet(): array
52
    {
53
        return $this->entityChangeSet;
54
    }
55
56
    /**
57
     * @param array $changeSet Entity change set
58
     */
59
    public function setEntityChangeSet(array $changeSet = []): void
60
    {
61
        $this->entityChangeSet = $changeSet;
62
    }
63
}
64