@@ -42,10 +42,8 @@ discard block |
||
42 | 42 | use Sonata\AdminBundle\Templating\MutableTemplateRegistryInterface; |
43 | 43 | use Sonata\AdminBundle\Translator\LabelTranslatorStrategyInterface; |
44 | 44 | use Sonata\Exporter\Source\SourceIteratorInterface; |
45 | -use Sonata\Form\Validator\Constraints\InlineConstraint; |
|
46 | 45 | use Sonata\Form\Validator\ErrorElement; |
47 | 46 | use Symfony\Component\Form\Extension\Core\Type\HiddenType; |
48 | -use Symfony\Component\Form\Form; |
|
49 | 47 | use Symfony\Component\Form\FormBuilderInterface; |
50 | 48 | use Symfony\Component\Form\FormEvent; |
51 | 49 | use Symfony\Component\Form\FormEvents; |
@@ -55,7 +53,6 @@ discard block |
||
55 | 53 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface as RoutingUrlGeneratorInterface; |
56 | 54 | use Symfony\Component\Security\Acl\Model\DomainObjectInterface; |
57 | 55 | use Symfony\Component\Security\Core\Exception\AccessDeniedException; |
58 | -use Symfony\Component\Validator\Mapping\GenericMetadata; |
|
59 | 56 | use Symfony\Component\Validator\Validator\ValidatorInterface; |
60 | 57 | use Symfony\Contracts\Translation\TranslatorInterface; |
61 | 58 |
@@ -40,24 +40,54 @@ discard block |
||
40 | 40 | */ |
41 | 41 | interface AdminInterface extends AccessRegistryInterface, FieldDescriptionRegistryInterface, LifecycleHookProviderInterface, MenuBuilderInterface, ParentAdminInterface, UrlGeneratorInterface |
42 | 42 | { |
43 | + /** |
|
44 | + * @return void |
|
45 | + */ |
|
43 | 46 | public function setMenuFactory(FactoryInterface $menuFactory): void; |
44 | 47 | |
48 | + /** |
|
49 | + * @return FactoryInterface |
|
50 | + */ |
|
45 | 51 | public function getMenuFactory(): ?FactoryInterface; |
46 | 52 | |
53 | + /** |
|
54 | + * @return void |
|
55 | + */ |
|
47 | 56 | public function setFormContractor(FormContractorInterface $formContractor): void; |
48 | 57 | |
58 | + /** |
|
59 | + * @return void |
|
60 | + */ |
|
49 | 61 | public function setListBuilder(ListBuilderInterface $listBuilder): void; |
50 | 62 | |
63 | + /** |
|
64 | + * @return ListBuilderInterface |
|
65 | + */ |
|
51 | 66 | public function getListBuilder(): ?ListBuilderInterface; |
52 | 67 | |
68 | + /** |
|
69 | + * @return void |
|
70 | + */ |
|
53 | 71 | public function setDatagridBuilder(DatagridBuilderInterface $datagridBuilder): void; |
54 | 72 | |
73 | + /** |
|
74 | + * @return DatagridBuilderInterface |
|
75 | + */ |
|
55 | 76 | public function getDatagridBuilder(): ?DatagridBuilderInterface; |
56 | 77 | |
78 | + /** |
|
79 | + * @return void |
|
80 | + */ |
|
57 | 81 | public function setTranslator(TranslatorInterface $translator): void; |
58 | 82 | |
83 | + /** |
|
84 | + * @return void |
|
85 | + */ |
|
59 | 86 | public function setRequest(Request $request): void; |
60 | 87 | |
88 | + /** |
|
89 | + * @return void |
|
90 | + */ |
|
61 | 91 | public function setConfigurationPool(Pool $pool): void; |
62 | 92 | |
63 | 93 | /** |
@@ -68,6 +98,9 @@ discard block |
||
68 | 98 | */ |
69 | 99 | public function getClass(): string; |
70 | 100 | |
101 | + /** |
|
102 | + * @return void |
|
103 | + */ |
|
71 | 104 | public function attachAdminClass(FieldDescriptionInterface $fieldDescription): void; |
72 | 105 | |
73 | 106 | public function getDatagrid(): DatagridInterface; |
@@ -76,6 +109,7 @@ discard block |
||
76 | 109 | |
77 | 110 | /** |
78 | 111 | * Set base controller name. |
112 | + * @return void |
|
79 | 113 | */ |
80 | 114 | public function setBaseControllerName(string $baseControllerName): void; |
81 | 115 | |
@@ -86,14 +120,19 @@ discard block |
||
86 | 120 | |
87 | 121 | /** |
88 | 122 | * Sets a list of templates. |
123 | + * @return void |
|
89 | 124 | */ |
90 | 125 | public function setTemplates(array $templates): void; |
91 | 126 | |
92 | 127 | /** |
93 | 128 | * Sets a specific template. |
129 | + * @return void |
|
94 | 130 | */ |
95 | 131 | public function setTemplate(string $name, string $template): void; |
96 | 132 | |
133 | + /** |
|
134 | + * @return ModelManagerInterface |
|
135 | + */ |
|
97 | 136 | public function getModelManager(): ?ModelManagerInterface; |
98 | 137 | |
99 | 138 | /** |
@@ -110,6 +149,7 @@ discard block |
||
110 | 149 | |
111 | 150 | /** |
112 | 151 | * Returns a form depend on the given $object. |
152 | + * @return FormInterface|null |
|
113 | 153 | */ |
114 | 154 | public function getForm(): ?FormInterface; |
115 | 155 | |
@@ -135,6 +175,9 @@ discard block |
||
135 | 175 | */ |
136 | 176 | public function getSecurityInformation(): array; |
137 | 177 | |
178 | + /** |
|
179 | + * @return void |
|
180 | + */ |
|
138 | 181 | public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription): void; |
139 | 182 | |
140 | 183 | /** |
@@ -159,8 +202,14 @@ discard block |
||
159 | 202 | */ |
160 | 203 | public function hasRoute(string $name): bool; |
161 | 204 | |
205 | + /** |
|
206 | + * @return void |
|
207 | + */ |
|
162 | 208 | public function setSecurityHandler(SecurityHandlerInterface $securityHandler): void; |
163 | 209 | |
210 | + /** |
|
211 | + * @return SecurityHandlerInterface |
|
212 | + */ |
|
164 | 213 | public function getSecurityHandler(): ?SecurityHandlerInterface; |
165 | 214 | |
166 | 215 | /** |
@@ -173,16 +222,34 @@ discard block |
||
173 | 222 | */ |
174 | 223 | public function getNormalizedIdentifier(object $model): ?string; |
175 | 224 | |
225 | + /** |
|
226 | + * @return string |
|
227 | + */ |
|
176 | 228 | public function id(object $model): ?string; |
177 | 229 | |
230 | + /** |
|
231 | + * @return void |
|
232 | + */ |
|
178 | 233 | public function setValidator(ValidatorInterface $validator): void; |
179 | 234 | |
235 | + /** |
|
236 | + * @return ValidatorInterface |
|
237 | + */ |
|
180 | 238 | public function getValidator(): ?ValidatorInterface; |
181 | 239 | |
240 | + /** |
|
241 | + * @return FieldDescriptionCollection|null |
|
242 | + */ |
|
182 | 243 | public function getShow(): ?FieldDescriptionCollection; |
183 | 244 | |
245 | + /** |
|
246 | + * @return void |
|
247 | + */ |
|
184 | 248 | public function setFormTheme(array $formTheme): void; |
185 | 249 | |
250 | + /** |
|
251 | + * @return FieldDescriptionCollection|null |
|
252 | + */ |
|
186 | 253 | public function getList(): ?FieldDescriptionCollection; |
187 | 254 | |
188 | 255 | /** |
@@ -190,6 +257,9 @@ discard block |
||
190 | 257 | */ |
191 | 258 | public function getFormTheme(): array; |
192 | 259 | |
260 | + /** |
|
261 | + * @return void |
|
262 | + */ |
|
193 | 263 | public function setFilterTheme(array $filterTheme): void; |
194 | 264 | |
195 | 265 | /** |
@@ -197,6 +267,9 @@ discard block |
||
197 | 267 | */ |
198 | 268 | public function getFilterTheme(): array; |
199 | 269 | |
270 | + /** |
|
271 | + * @return void |
|
272 | + */ |
|
200 | 273 | public function addExtension(AdminExtensionInterface $extension): void; |
201 | 274 | |
202 | 275 | /** |
@@ -206,14 +279,26 @@ discard block |
||
206 | 279 | */ |
207 | 280 | public function getExtensions(): array; |
208 | 281 | |
282 | + /** |
|
283 | + * @return void |
|
284 | + */ |
|
209 | 285 | public function setRouteBuilder(RouteBuilderInterface $routeBuilder): void; |
210 | 286 | |
287 | + /** |
|
288 | + * @return RouteBuilderInterface |
|
289 | + */ |
|
211 | 290 | public function getRouteBuilder(): ?RouteBuilderInterface; |
212 | 291 | |
213 | 292 | public function toString(object $object): string; |
214 | 293 | |
294 | + /** |
|
295 | + * @return void |
|
296 | + */ |
|
215 | 297 | public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy): void; |
216 | 298 | |
299 | + /** |
|
300 | + * @return LabelTranslatorStrategyInterface |
|
301 | + */ |
|
217 | 302 | public function getLabelTranslatorStrategy(): ?LabelTranslatorStrategyInterface; |
218 | 303 | |
219 | 304 | /** |
@@ -225,6 +310,9 @@ discard block |
||
225 | 310 | |
226 | 311 | public function getNewInstance(): object; |
227 | 312 | |
313 | + /** |
|
314 | + * @return void |
|
315 | + */ |
|
228 | 316 | public function setUniqid(string $uniqId): void; |
229 | 317 | |
230 | 318 | /** |
@@ -244,6 +332,9 @@ discard block |
||
244 | 332 | */ |
245 | 333 | public function getObject($id): ?object; |
246 | 334 | |
335 | + /** |
|
336 | + * @return void |
|
337 | + */ |
|
247 | 338 | public function setSubject(?object $subject): void; |
248 | 339 | |
249 | 340 | public function getSubject(): object; |
@@ -267,6 +358,7 @@ discard block |
||
267 | 358 | |
268 | 359 | /** |
269 | 360 | * Call before the batch action, allow you to alter the query and the idx. |
361 | + * @return void |
|
270 | 362 | */ |
271 | 363 | public function preBatchAction(string $actionName, ProxyQueryInterface $query, array &$idx, bool $allElements = false): void; |
272 | 364 | |
@@ -286,11 +378,15 @@ discard block |
||
286 | 378 | |
287 | 379 | /** |
288 | 380 | * Add object security, fe. make the current user owner of the object. |
381 | + * @return void |
|
289 | 382 | */ |
290 | 383 | public function createObjectSecurity(object $object): void; |
291 | 384 | |
292 | 385 | public function getParent(): self; |
293 | 386 | |
387 | + /** |
|
388 | + * @return void |
|
389 | + */ |
|
294 | 390 | public function setParent(self $admin): void; |
295 | 391 | |
296 | 392 | /** |
@@ -302,6 +398,7 @@ discard block |
||
302 | 398 | * Set the translation domain. |
303 | 399 | * |
304 | 400 | * @param string $translationDomain the translation domain |
401 | + * @return void |
|
305 | 402 | */ |
306 | 403 | public function setTranslationDomain(string $translationDomain): void; |
307 | 404 | |
@@ -321,6 +418,7 @@ discard block |
||
321 | 418 | |
322 | 419 | /** |
323 | 420 | * Set the form groups. |
421 | + * @return void |
|
324 | 422 | */ |
325 | 423 | public function setFormGroups(array $formGroups): void; |
326 | 424 | |
@@ -329,6 +427,9 @@ discard block |
||
329 | 427 | */ |
330 | 428 | public function getFormTabs(): array; |
331 | 429 | |
430 | + /** |
|
431 | + * @return void |
|
432 | + */ |
|
332 | 433 | public function setFormTabs(array $formTabs): void; |
333 | 434 | |
334 | 435 | /** |
@@ -336,10 +437,14 @@ discard block |
||
336 | 437 | */ |
337 | 438 | public function getShowTabs(): array; |
338 | 439 | |
440 | + /** |
|
441 | + * @return void |
|
442 | + */ |
|
339 | 443 | public function setShowTabs(array $showTabs): void; |
340 | 444 | |
341 | 445 | /** |
342 | 446 | * Remove a form group field. |
447 | + * @return void |
|
343 | 448 | */ |
344 | 449 | public function removeFieldFromFormGroup(string $key): void; |
345 | 450 | |
@@ -352,11 +457,13 @@ discard block |
||
352 | 457 | |
353 | 458 | /** |
354 | 459 | * Set the show groups. |
460 | + * @return void |
|
355 | 461 | */ |
356 | 462 | public function setShowGroups(array $showGroups): void; |
357 | 463 | |
358 | 464 | /** |
359 | 465 | * Reorder items in showGroup. |
466 | + * @return void |
|
360 | 467 | */ |
361 | 468 | public function reorderShowGroup(string $group, array $keys): void; |
362 | 469 | |
@@ -372,6 +479,7 @@ discard block |
||
372 | 479 | |
373 | 480 | /** |
374 | 481 | * Sets the list of supported sub classes. |
482 | + * @return void |
|
375 | 483 | */ |
376 | 484 | public function setSubClasses(array $subClasses): void; |
377 | 485 | |
@@ -410,6 +518,7 @@ discard block |
||
410 | 518 | |
411 | 519 | /** |
412 | 520 | * Returns Admin`s label. |
521 | + * @return string |
|
413 | 522 | */ |
414 | 523 | public function getLabel(): ?string; |
415 | 524 | |
@@ -424,6 +533,7 @@ discard block |
||
424 | 533 | |
425 | 534 | /** |
426 | 535 | * Set the current child status. |
536 | + * @return void |
|
427 | 537 | */ |
428 | 538 | public function setCurrentChild(bool $currentChild): void; |
429 | 539 | |
@@ -444,6 +554,9 @@ discard block |
||
444 | 554 | */ |
445 | 555 | public function getListModes(): array; |
446 | 556 | |
557 | + /** |
|
558 | + * @return void |
|
559 | + */ |
|
447 | 560 | public function setListMode(string $mode): void; |
448 | 561 | |
449 | 562 | /** |
@@ -468,12 +581,14 @@ discard block |
||
468 | 581 | |
469 | 582 | /** |
470 | 583 | * Returns the result link for an object. |
584 | + * @return string|null |
|
471 | 585 | */ |
472 | 586 | public function getSearchResultLink(object $object): ?string; |
473 | 587 | |
474 | 588 | /** |
475 | 589 | * Setting to true will enable mosaic button for the admin screen. |
476 | 590 | * Setting to false will hide mosaic button for the admin screen. |
591 | + * @return void |
|
477 | 592 | */ |
478 | 593 | public function showMosaicButton(bool $isShown): void; |
479 | 594 | |
@@ -494,6 +609,9 @@ discard block |
||
494 | 609 | */ |
495 | 610 | public function getRootCode(): string; |
496 | 611 | |
612 | + /** |
|
613 | + * @return void |
|
614 | + */ |
|
497 | 615 | public function setFilterPersister(?FilterPersisterInterface $filterPersister = null): void; |
498 | 616 | |
499 | 617 | /** |
@@ -506,14 +624,24 @@ discard block |
||
506 | 624 | */ |
507 | 625 | public function getBaseRouteName(): string; |
508 | 626 | |
627 | + /** |
|
628 | + * @param AbstractAdmin $childAdmin |
|
629 | + */ |
|
509 | 630 | public function getSideMenu(string $action, ?self $childAdmin = null): ItemInterface; |
510 | 631 | |
632 | + /** |
|
633 | + * @return void |
|
634 | + */ |
|
511 | 635 | public function addParentAssociationMapping(string $code, string $value): void; |
512 | 636 | |
637 | + /** |
|
638 | + * @return RouteGeneratorInterface|null |
|
639 | + */ |
|
513 | 640 | public function getRouteGenerator(): ?RouteGeneratorInterface; |
514 | 641 | |
515 | 642 | /** |
516 | 643 | * Returns the current child admin instance. |
644 | + * @return AdminInterface|null |
|
517 | 645 | */ |
518 | 646 | public function getCurrentChildAdmin(): ?self; |
519 | 647 | |
@@ -523,11 +651,15 @@ discard block |
||
523 | 651 | */ |
524 | 652 | public function getParentAssociationMapping(): ?string; |
525 | 653 | |
654 | + /** |
|
655 | + * @return void |
|
656 | + */ |
|
526 | 657 | public function reorderFormGroup(string $group, array $keys): void; |
527 | 658 | |
528 | 659 | /** |
529 | 660 | * This method is being called by the main admin class and the child class, |
530 | 661 | * the getFormBuilder is only call by the main admin class. |
662 | + * @return void |
|
531 | 663 | */ |
532 | 664 | public function defineFormBuilder(FormBuilderInterface $formBuilder): void; |
533 | 665 | } |