1 | <?php |
||
13 | class Action |
||
14 | { |
||
15 | protected $name; |
||
16 | |||
17 | protected $type; |
||
18 | |||
19 | protected $label; |
||
20 | |||
21 | protected $icon; |
||
22 | |||
23 | protected $class; |
||
24 | |||
25 | protected $options = array(); |
||
26 | |||
27 | protected $submit; |
||
28 | |||
29 | protected $route; |
||
30 | |||
31 | protected $params = array(); |
||
32 | |||
33 | protected $confirmMessage; |
||
34 | |||
35 | protected $confirmModal; |
||
36 | |||
37 | protected $csrfProtected = false; |
||
38 | |||
39 | protected $forceIntermediate = false; |
||
40 | |||
41 | protected $credentials = 'AdmingenAllowed'; |
||
42 | |||
43 | public function __construct($name, $type = 'custom') |
||
48 | |||
49 | public function setProperty($option, $value) |
||
54 | |||
55 | public function getName() |
||
59 | |||
60 | public function getTwigName() |
||
64 | |||
65 | public function getType() |
||
69 | |||
70 | /** |
||
71 | * @param string $label |
||
72 | */ |
||
73 | public function setLabel($label) |
||
77 | |||
78 | public function getLabel() |
||
86 | |||
87 | /** |
||
88 | * @param string $icon |
||
89 | */ |
||
90 | public function setIcon($icon) |
||
94 | |||
95 | public function getIcon() |
||
99 | |||
100 | /** |
||
101 | * @param string $class |
||
102 | */ |
||
103 | public function setClass($class) |
||
107 | |||
108 | public function getClass() |
||
112 | |||
113 | /** |
||
114 | * @param string $route |
||
115 | */ |
||
116 | public function setRoute($route) |
||
120 | |||
121 | public function getRoute() |
||
125 | |||
126 | /** |
||
127 | * @param boolean $submit |
||
128 | */ |
||
129 | public function setSubmit($submit) |
||
133 | |||
134 | public function getSubmit() |
||
138 | |||
139 | private function humanize($text) |
||
143 | |||
144 | /** |
||
145 | * @param string $confirmMessage |
||
146 | */ |
||
147 | public function setConfirm($confirmMessage) |
||
151 | |||
152 | public function getConfirm() |
||
156 | |||
157 | /** |
||
158 | * @param string $confirmModal |
||
159 | */ |
||
160 | public function setConfirmModal($confirmModal) |
||
164 | |||
165 | public function getConfirmModal() |
||
169 | |||
170 | /** |
||
171 | * @param boolean $csrfProtected |
||
172 | */ |
||
173 | public function setCsrfProtected($csrfProtected) |
||
177 | |||
178 | public function getCsrfProtected() |
||
182 | |||
183 | public function setCredentials($credentials) |
||
187 | |||
188 | public function setForceIntermediate($forceIntermediate) |
||
192 | |||
193 | public function getForceIntermediate() |
||
197 | |||
198 | public function getCredentials() |
||
202 | |||
203 | public function getParams() |
||
207 | |||
208 | public function setParams(array $params) |
||
212 | |||
213 | public function getOptions() |
||
217 | |||
218 | public function setOptions(array $options) |
||
222 | } |
||
223 |