|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace LAG\AdminBundle\Admin\Event; |
|
4
|
|
|
|
|
5
|
|
|
use LAG\AdminBundle\Action\ActionInterface; |
|
6
|
|
|
use LAG\AdminBundle\Admin\AdminInterface; |
|
7
|
|
|
use Symfony\Component\EventDispatcher\Event; |
|
8
|
|
|
|
|
9
|
|
|
class AdminEvent extends Event |
|
10
|
|
|
{ |
|
11
|
|
|
/** |
|
12
|
|
|
* Array containing the configuration of each Admin |
|
13
|
|
|
* |
|
14
|
|
|
* @var array |
|
15
|
|
|
*/ |
|
16
|
|
|
protected $adminsConfiguration = []; |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* Array containing the configuration of the related Admin |
|
20
|
|
|
* |
|
21
|
|
|
* @var array |
|
22
|
|
|
*/ |
|
23
|
|
|
protected $adminConfiguration = []; |
|
24
|
|
|
|
|
25
|
|
|
/** |
|
26
|
|
|
* Related Action configuration |
|
27
|
|
|
* |
|
28
|
|
|
* @var array |
|
29
|
|
|
*/ |
|
30
|
|
|
protected $actionConfiguration = []; |
|
31
|
|
|
|
|
32
|
|
|
/** |
|
33
|
|
|
* Related Admin name. |
|
34
|
|
|
* |
|
35
|
|
|
* @var string |
|
36
|
|
|
*/ |
|
37
|
|
|
protected $adminName; |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* Related Action name |
|
41
|
|
|
* |
|
42
|
|
|
* @var string |
|
43
|
|
|
*/ |
|
44
|
|
|
protected $actionName; |
|
45
|
|
|
|
|
46
|
|
|
/** |
|
47
|
|
|
* @var AdminInterface |
|
48
|
|
|
*/ |
|
49
|
|
|
protected $admin; |
|
50
|
|
|
|
|
51
|
|
|
/** |
|
52
|
|
|
* @var ActionInterface |
|
53
|
|
|
*/ |
|
54
|
|
|
protected $action; |
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* @return AdminInterface |
|
58
|
|
|
*/ |
|
59
|
1 |
|
public function getAdmin() |
|
60
|
|
|
{ |
|
61
|
1 |
|
return $this->admin; |
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* @param AdminInterface $admin |
|
66
|
|
|
* @return $this |
|
67
|
|
|
*/ |
|
68
|
6 |
|
public function setAdmin(AdminInterface $admin) |
|
69
|
|
|
{ |
|
70
|
6 |
|
$this->admin = $admin; |
|
71
|
|
|
|
|
72
|
6 |
|
return $this; |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
/** |
|
76
|
|
|
* @return string |
|
77
|
|
|
*/ |
|
78
|
1 |
|
public function getActionName() |
|
79
|
|
|
{ |
|
80
|
1 |
|
return $this->actionName; |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
/** |
|
84
|
|
|
* @param string $actionName |
|
85
|
|
|
* @return $this |
|
86
|
|
|
*/ |
|
87
|
7 |
|
public function setActionName($actionName) |
|
88
|
|
|
{ |
|
89
|
7 |
|
$this->actionName = $actionName; |
|
90
|
|
|
|
|
91
|
7 |
|
return $this; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* @param string $adminName |
|
96
|
|
|
* @return AdminEvent |
|
97
|
|
|
*/ |
|
98
|
6 |
|
public function setAdminName($adminName) |
|
99
|
|
|
{ |
|
100
|
6 |
|
$this->adminName = $adminName; |
|
101
|
|
|
|
|
102
|
6 |
|
return $this; |
|
103
|
|
|
} |
|
104
|
|
|
|
|
105
|
|
|
/** |
|
106
|
|
|
* @return string |
|
107
|
|
|
*/ |
|
108
|
|
|
public function getAdminName() |
|
109
|
|
|
{ |
|
110
|
|
|
return $this->adminName; |
|
111
|
|
|
} |
|
112
|
|
|
|
|
113
|
|
|
/** |
|
114
|
|
|
* @return ActionInterface |
|
115
|
|
|
*/ |
|
116
|
|
|
public function getAction() |
|
117
|
|
|
{ |
|
118
|
|
|
return $this->action; |
|
119
|
|
|
} |
|
120
|
|
|
|
|
121
|
|
|
/** |
|
122
|
|
|
* @param ActionInterface $action |
|
123
|
|
|
* @return $this |
|
124
|
|
|
*/ |
|
125
|
5 |
|
public function setAction(ActionInterface $action) |
|
126
|
|
|
{ |
|
127
|
5 |
|
$this->action = $action; |
|
128
|
|
|
|
|
129
|
5 |
|
return $this; |
|
130
|
|
|
} |
|
131
|
|
|
|
|
132
|
|
|
/** |
|
133
|
|
|
* @return array |
|
134
|
|
|
*/ |
|
135
|
5 |
|
public function getAdminsConfiguration() |
|
136
|
|
|
{ |
|
137
|
5 |
|
return $this->adminsConfiguration; |
|
138
|
|
|
} |
|
139
|
|
|
|
|
140
|
|
|
/** |
|
141
|
|
|
* @param array $adminsConfiguration |
|
142
|
|
|
* @return $this |
|
143
|
|
|
*/ |
|
144
|
6 |
|
public function setAdminsConfiguration(array $adminsConfiguration) |
|
145
|
|
|
{ |
|
146
|
6 |
|
$this->adminsConfiguration = $adminsConfiguration; |
|
147
|
|
|
|
|
148
|
6 |
|
return $this; |
|
149
|
|
|
} |
|
150
|
|
|
|
|
151
|
|
|
/** |
|
152
|
|
|
* @return array |
|
153
|
|
|
*/ |
|
154
|
5 |
|
public function getAdminConfiguration() |
|
155
|
|
|
{ |
|
156
|
5 |
|
return $this->adminConfiguration; |
|
157
|
|
|
} |
|
158
|
|
|
|
|
159
|
|
|
/** |
|
160
|
|
|
* @param array $adminConfiguration |
|
161
|
|
|
* @return $this |
|
162
|
|
|
*/ |
|
163
|
7 |
|
public function setAdminConfiguration(array $adminConfiguration) |
|
164
|
|
|
{ |
|
165
|
7 |
|
$this->adminConfiguration = $adminConfiguration; |
|
166
|
|
|
|
|
167
|
7 |
|
return $this; |
|
168
|
|
|
} |
|
169
|
|
|
|
|
170
|
|
|
/** |
|
171
|
|
|
* @param array $actionConfiguration |
|
172
|
|
|
* @return $this |
|
173
|
|
|
*/ |
|
174
|
7 |
|
public function setActionConfiguration(array $actionConfiguration) |
|
175
|
|
|
{ |
|
176
|
7 |
|
$this->actionConfiguration = $actionConfiguration; |
|
177
|
|
|
|
|
178
|
7 |
|
return $this; |
|
179
|
|
|
} |
|
180
|
|
|
|
|
181
|
|
|
/** |
|
182
|
|
|
* @return array |
|
183
|
|
|
*/ |
|
184
|
6 |
|
public function getActionConfiguration() |
|
185
|
|
|
{ |
|
186
|
6 |
|
return $this->actionConfiguration; |
|
187
|
|
|
} |
|
188
|
|
|
} |
|
189
|
|
|
|