1 | <?php |
||
32 | class ProfileValidateComponent extends Component implements ValidateComponentInterface |
||
33 | { |
||
34 | /** |
||
35 | * Validate fields with rules. |
||
36 | * |
||
37 | * @var array |
||
38 | */ |
||
39 | private $rules = []; |
||
40 | |||
41 | /** |
||
42 | * Attributes. |
||
43 | * |
||
44 | * @var array |
||
45 | */ |
||
46 | private $attributes = []; |
||
47 | |||
48 | /** |
||
49 | * Attribute labels. |
||
50 | * |
||
51 | * @var array |
||
52 | */ |
||
53 | private $attributeLabels = []; |
||
54 | |||
55 | /** |
||
56 | * Set manage for roles. |
||
57 | * |
||
58 | * @var bool |
||
59 | */ |
||
60 | private $rbacManage = false; |
||
61 | |||
62 | /** |
||
63 | * Rewrite rules, labels, attributes by custom. |
||
64 | * |
||
65 | * @var bool |
||
66 | */ |
||
67 | private $customRewrite = false; |
||
68 | |||
69 | /** |
||
70 | * Form fields for the template. |
||
71 | * |
||
72 | * @var array |
||
73 | */ |
||
74 | private $formFields = []; |
||
75 | |||
76 | /** |
||
77 | * Columns for GridView widget in index template file. |
||
78 | * |
||
79 | * @var array |
||
80 | */ |
||
81 | private $indexViewColumns = []; |
||
82 | |||
83 | /** |
||
84 | * Attributes for DetailView widget in view template file. |
||
85 | * |
||
86 | * @var array |
||
87 | */ |
||
88 | private $detailViewAttributes = []; |
||
89 | |||
90 | /** |
||
91 | * Auth manager. |
||
92 | * |
||
93 | * @var ManagerInterface |
||
94 | */ |
||
95 | private $authManager; |
||
96 | |||
97 | /** |
||
98 | * Initialize. |
||
99 | */ |
||
100 | public function init() |
||
106 | |||
107 | /** |
||
108 | * Set validate fields with rules. |
||
109 | * |
||
110 | * @param array $rules |
||
111 | */ |
||
112 | public function setRules(array $rules): void |
||
116 | |||
117 | /** |
||
118 | * Get validate fields with rules. |
||
119 | * |
||
120 | * @return array |
||
121 | */ |
||
122 | public function getRules(): array |
||
126 | |||
127 | /** |
||
128 | * Set attributes. |
||
129 | * |
||
130 | * @param array $attributes |
||
131 | */ |
||
132 | public function setAttributes(array $attributes): void |
||
136 | |||
137 | /** |
||
138 | * Get attributes. |
||
139 | * |
||
140 | * @return array |
||
141 | */ |
||
142 | public function getAttributes(): array |
||
146 | |||
147 | /** |
||
148 | * Set attribute labels. |
||
149 | * |
||
150 | * @param array $attributeLabels |
||
151 | */ |
||
152 | public function setAttributeLabels(array $attributeLabels): void |
||
156 | |||
157 | /** |
||
158 | * Get attribute labels. |
||
159 | * |
||
160 | * @return array |
||
161 | */ |
||
162 | public function getAttributeLabels(): array |
||
166 | |||
167 | /** |
||
168 | * Set manage for roles. |
||
169 | * |
||
170 | * @param bool $rbacManage |
||
171 | */ |
||
172 | public function setRbacManage(bool $rbacManage): void |
||
176 | |||
177 | /** |
||
178 | * Is manage for roles. |
||
179 | * |
||
180 | * @return bool |
||
181 | */ |
||
182 | public function getRbacManage(): bool |
||
186 | |||
187 | /** |
||
188 | * Set rewrite rules, labels, attributes by custom. |
||
189 | * |
||
190 | * @param bool $customRewrite |
||
191 | */ |
||
192 | public function setCustomRewrite(bool $customRewrite): void |
||
196 | |||
197 | /** |
||
198 | * Get rewrite rules, labels, attributes by custom. |
||
199 | * |
||
200 | * @return bool |
||
201 | */ |
||
202 | public function getCustomRewrite(): bool |
||
206 | |||
207 | /** |
||
208 | * Set form fields for the template. |
||
209 | * |
||
210 | * @param array $formFields |
||
211 | */ |
||
212 | public function setFormFields(array $formFields): void |
||
216 | |||
217 | /** |
||
218 | * Get Form fields for the template. |
||
219 | * |
||
220 | * @return array |
||
221 | */ |
||
222 | public function getFormFields(): array |
||
226 | |||
227 | /** |
||
228 | * Set columns for GridView widget in index template file. |
||
229 | * |
||
230 | * @param array $indexViewColumns |
||
231 | */ |
||
232 | public function setIndexViewColumns(array $indexViewColumns): void |
||
236 | |||
237 | /** |
||
238 | * Get columns for GridView widget in index template file. |
||
239 | * |
||
240 | * @return array |
||
241 | */ |
||
242 | public function getIndexViewColumns(): array |
||
246 | |||
247 | /** |
||
248 | * Set attributes for DetailView widget in view template file. |
||
249 | * |
||
250 | * @param array $detailViewAttributes |
||
251 | */ |
||
252 | public function setDetailViewAttributes(array $detailViewAttributes): void |
||
256 | |||
257 | /** |
||
258 | * Get attributes for DetailView widget in view template file. |
||
259 | * |
||
260 | * @return array |
||
261 | */ |
||
262 | public function getDetailViewAttributes(): array |
||
266 | |||
267 | /** |
||
268 | * Set authManager (RBAC). |
||
269 | * |
||
270 | * @param ManagerInterface $authManager |
||
271 | */ |
||
272 | public function setAuthManager(ManagerInterface $authManager): void |
||
276 | |||
277 | /** |
||
278 | * Get authManager (RBAC). |
||
279 | * |
||
280 | * @return ManagerInterface |
||
281 | */ |
||
282 | public function getAuthManager(): ManagerInterface |
||
286 | |||
287 | /** |
||
288 | * Set a user model for ProfileValidateComponent validation model. |
||
289 | * |
||
290 | * @param $model |
||
291 | * |
||
292 | * @throws InvalidConfigException |
||
293 | * |
||
294 | * @return ModelInterface |
||
295 | */ |
||
296 | public function setModel($model): ModelInterface |
||
314 | } |
||
315 |