Completed
Push — dev ( df0c76...243dfc )
by Arnaud
02:38
created

BeforeConfigurationEvent::getActionConfiguration()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace LAG\AdminBundle\Action\Event;
4
5
use LAG\AdminBundle\Admin\AdminInterface;
6
use Symfony\Component\EventDispatcher\Event;
7
8
/**
9
 * Event dispatch before the creation of an action to allow third-party modification
10
 */
11
class BeforeConfigurationEvent extends Event
12
{
13
    /**
14
     * @var AdminInterface
15
     */
16
    protected $admin;
17
18
    /**
19
     * @var string
20
     */
21
    protected $actionName;
22
23
    /**
24
     * @var array
25 3
     */
26
    protected $actionConfiguration;
27 3
28 3
    /**
29 3
     * BeforeConfigurationEvent constructor.
30 3
     *
31
     * @param $actionName
32
     * @param $actionConfiguration
33
     * @param AdminInterface $admin
34
     */
35
    public function __construct($actionName, $actionConfiguration, AdminInterface $admin)
36
    {
37
        $this->actionName = $actionName;
38
        $this->actionConfiguration = $actionConfiguration;
39
        $this->admin = $admin;
40
    }
41
42
    /**
43
     * @return AdminInterface
44
     */
45
    public function getAdmin()
46
    {
47
        return $this->admin;
48
    }
49
50
    /**
51 3
     * @return string
52
     */
53 3
    public function getActionName()
54
    {
55
        return $this->actionName;
56
    }
57
58
    /**
59
     * @return array
60
     */
61
    public function getActionConfiguration()
62
    {
63
        return $this->actionConfiguration;
64
    }
65
66
    /**
67
     * @param array $actionConfiguration
68
     */
69
    public function setActionConfiguration($actionConfiguration)
70
    {
71
        $this->actionConfiguration = $actionConfiguration;
72
    }
73
}
74