Completed
Push — master ( bd4cbc...df0c76 )
by Arnaud
9s
created

BeforeConfigurationEvent::setActionConfiguration()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
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 View Code Duplication
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
     */
26
    protected $actionConfiguration;
27
28
    /**
29
     * BeforeConfigurationEvent constructor.
30
     *
31
     * @param $actionName
32
     * @param $actionConfiguration
33
     * @param AdminInterface $admin
34
     */
35 5
    public function __construct($actionName, $actionConfiguration, AdminInterface $admin)
36
    {
37 5
        $this->actionName = $actionName;
38 5
        $this->actionConfiguration = $actionConfiguration;
39 5
        $this->admin = $admin;
40 5
    }
41
42
    /**
43
     * @return AdminInterface
44
     */
45 2
    public function getAdmin()
46
    {
47 2
        return $this->admin;
48
    }
49
50
    /**
51
     * @return string
52
     */
53 2
    public function getActionName()
54
    {
55 2
        return $this->actionName;
56
    }
57
58
    /**
59
     * @return array
60
     */
61 5
    public function getActionConfiguration()
62
    {
63 5
        return $this->actionConfiguration;
64
    }
65
66
    /**
67
     * @param array $actionConfiguration
68
     */
69 2
    public function setActionConfiguration($actionConfiguration)
70
    {
71 2
        $this->actionConfiguration = $actionConfiguration;
72 2
    }
73
}
74