@@ -25,6 +25,9 @@ |
||
25 | 25 | */ |
26 | 26 | trait PolyfillControllerTrait |
27 | 27 | { |
28 | + /** |
|
29 | + * @param string $methodName |
|
30 | + */ |
|
28 | 31 | public function __call($methodName, $arguments) |
29 | 32 | { |
30 | 33 | $this->proxyToController($methodName, $arguments); |
@@ -15,7 +15,6 @@ |
||
15 | 15 | |
16 | 16 | use Doctrine\Common\Collections\Collection; |
17 | 17 | use Doctrine\Common\Util\ClassUtils; |
18 | -use Doctrine\Inflector\Inflector; |
|
19 | 18 | use Doctrine\Inflector\InflectorFactory; |
20 | 19 | use Doctrine\ODM\MongoDB\PersistentCollection; |
21 | 20 | use Doctrine\ORM\PersistentCollection as DoctrinePersistentCollection; |
@@ -41,26 +41,59 @@ discard block |
||
41 | 41 | */ |
42 | 42 | interface AdminInterface extends AccessRegistryInterface, FieldDescriptionRegistryInterface, LifecycleHookProviderInterface, MenuBuilderInterface, ParentAdminInterface, UrlGeneratorInterface |
43 | 43 | { |
44 | + /** |
|
45 | + * @return void |
|
46 | + */ |
|
44 | 47 | public function setMenuFactory(MenuFactoryInterface $menuFactory): void; |
45 | 48 | |
49 | + /** |
|
50 | + * @return MenuFactoryInterface |
|
51 | + */ |
|
46 | 52 | public function getMenuFactory(): ?MenuFactoryInterface; |
47 | 53 | |
54 | + /** |
|
55 | + * @return void |
|
56 | + */ |
|
48 | 57 | public function setFormContractor(FormContractorInterface $formContractor): void; |
49 | 58 | |
59 | + /** |
|
60 | + * @return void |
|
61 | + */ |
|
50 | 62 | public function setListBuilder(ListBuilderInterface $listBuilder): void; |
51 | 63 | |
64 | + /** |
|
65 | + * @return ListBuilderInterface |
|
66 | + */ |
|
52 | 67 | public function getListBuilder(): ?ListBuilderInterface; |
53 | 68 | |
69 | + /** |
|
70 | + * @return void |
|
71 | + */ |
|
54 | 72 | public function setDatagridBuilder(DatagridBuilderInterface $datagridBuilder): void; |
55 | 73 | |
74 | + /** |
|
75 | + * @return DatagridBuilderInterface |
|
76 | + */ |
|
56 | 77 | public function getDatagridBuilder(): ?DatagridBuilderInterface; |
57 | 78 | |
79 | + /** |
|
80 | + * @return void |
|
81 | + */ |
|
58 | 82 | public function setTranslator(TranslatorInterface $translator): void; |
59 | 83 | |
84 | + /** |
|
85 | + * @return TranslatorInterface |
|
86 | + */ |
|
60 | 87 | public function getTranslator(): ?TranslatorInterface; |
61 | 88 | |
89 | + /** |
|
90 | + * @return void |
|
91 | + */ |
|
62 | 92 | public function setRequest(Request $request): void; |
63 | 93 | |
94 | + /** |
|
95 | + * @return void |
|
96 | + */ |
|
64 | 97 | public function setConfigurationPool(Pool $pool): void; |
65 | 98 | |
66 | 99 | /** |
@@ -71,12 +104,16 @@ discard block |
||
71 | 104 | */ |
72 | 105 | public function getClass(): string; |
73 | 106 | |
107 | + /** |
|
108 | + * @return void |
|
109 | + */ |
|
74 | 110 | public function attachAdminClass(FieldDescriptionInterface $fieldDescription): void; |
75 | 111 | |
76 | 112 | public function getDatagrid(): DatagridInterface; |
77 | 113 | |
78 | 114 | /** |
79 | 115 | * Set base controller name. |
116 | + * @return void |
|
80 | 117 | */ |
81 | 118 | public function setBaseControllerName(string $baseControllerName): void; |
82 | 119 | |
@@ -87,11 +124,13 @@ discard block |
||
87 | 124 | |
88 | 125 | /** |
89 | 126 | * Sets a list of templates. |
127 | + * @return void |
|
90 | 128 | */ |
91 | 129 | public function setTemplates(array $templates): void; |
92 | 130 | |
93 | 131 | /** |
94 | 132 | * Sets a specific template. |
133 | + * @return void |
|
95 | 134 | */ |
96 | 135 | public function setTemplate(string $name, string $template): void; |
97 | 136 | |
@@ -114,6 +153,7 @@ discard block |
||
114 | 153 | |
115 | 154 | /** |
116 | 155 | * Returns a form depend on the given $object. |
156 | + * @return \Symfony\Component\Form\Form|null |
|
117 | 157 | */ |
118 | 158 | public function getForm(): ?FormInterface; |
119 | 159 | |
@@ -144,6 +184,9 @@ discard block |
||
144 | 184 | */ |
145 | 185 | public function getSecurityInformation(): array; |
146 | 186 | |
187 | + /** |
|
188 | + * @return void |
|
189 | + */ |
|
147 | 190 | public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription): void; |
148 | 191 | |
149 | 192 | /** |
@@ -183,8 +226,14 @@ discard block |
||
183 | 226 | */ |
184 | 227 | public function hasRoute(string $name): bool; |
185 | 228 | |
229 | + /** |
|
230 | + * @return void |
|
231 | + */ |
|
186 | 232 | public function setSecurityHandler(SecurityHandlerInterface $securityHandler): void; |
187 | 233 | |
234 | + /** |
|
235 | + * @return SecurityHandlerInterface |
|
236 | + */ |
|
188 | 237 | public function getSecurityHandler(): ?SecurityHandlerInterface; |
189 | 238 | |
190 | 239 | /** |
@@ -203,17 +252,33 @@ discard block |
||
203 | 252 | * Shorthand method for templating. |
204 | 253 | * |
205 | 254 | * @param object $model |
255 | + * @return string |
|
206 | 256 | */ |
207 | 257 | public function id($model): ?string; |
208 | 258 | |
259 | + /** |
|
260 | + * @return void |
|
261 | + */ |
|
209 | 262 | public function setValidator(ValidatorInterface $validator): void; |
210 | 263 | |
264 | + /** |
|
265 | + * @return ValidatorInterface |
|
266 | + */ |
|
211 | 267 | public function getValidator(): ?ValidatorInterface; |
212 | 268 | |
269 | + /** |
|
270 | + * @return FieldDescriptionCollection|null |
|
271 | + */ |
|
213 | 272 | public function getShow(): ?FieldDescriptionCollection; |
214 | 273 | |
274 | + /** |
|
275 | + * @return void |
|
276 | + */ |
|
215 | 277 | public function setFormTheme(array $formTheme): void; |
216 | 278 | |
279 | + /** |
|
280 | + * @return FieldDescriptionCollection|null |
|
281 | + */ |
|
217 | 282 | public function getList(): ?FieldDescriptionCollection; |
218 | 283 | |
219 | 284 | /** |
@@ -221,6 +286,9 @@ discard block |
||
221 | 286 | */ |
222 | 287 | public function getFormTheme(): array; |
223 | 288 | |
289 | + /** |
|
290 | + * @return void |
|
291 | + */ |
|
224 | 292 | public function setFilterTheme(array $filterTheme): void; |
225 | 293 | |
226 | 294 | /** |
@@ -228,6 +296,9 @@ discard block |
||
228 | 296 | */ |
229 | 297 | public function getFilterTheme(): array; |
230 | 298 | |
299 | + /** |
|
300 | + * @return void |
|
301 | + */ |
|
231 | 302 | public function addExtension(AdminExtensionInterface $extension): void; |
232 | 303 | |
233 | 304 | /** |
@@ -237,8 +308,14 @@ discard block |
||
237 | 308 | */ |
238 | 309 | public function getExtensions(): array; |
239 | 310 | |
311 | + /** |
|
312 | + * @return void |
|
313 | + */ |
|
240 | 314 | public function setRouteBuilder(RouteBuilderInterface $routeBuilder): void; |
241 | 315 | |
316 | + /** |
|
317 | + * @return RouteBuilderInterface |
|
318 | + */ |
|
242 | 319 | public function getRouteBuilder(): ?RouteBuilderInterface; |
243 | 320 | |
244 | 321 | /** |
@@ -246,8 +323,14 @@ discard block |
||
246 | 323 | */ |
247 | 324 | public function toString($object): string; |
248 | 325 | |
326 | + /** |
|
327 | + * @return void |
|
328 | + */ |
|
249 | 329 | public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy): void; |
250 | 330 | |
331 | + /** |
|
332 | + * @return LabelTranslatorStrategyInterface |
|
333 | + */ |
|
251 | 334 | public function getLabelTranslatorStrategy(): ?LabelTranslatorStrategyInterface; |
252 | 335 | |
253 | 336 | /** |
@@ -259,6 +342,9 @@ discard block |
||
259 | 342 | |
260 | 343 | public function getNewInstance(): object; |
261 | 344 | |
345 | + /** |
|
346 | + * @return void |
|
347 | + */ |
|
262 | 348 | public function setUniqid(string $uniqId): void; |
263 | 349 | |
264 | 350 | /** |
@@ -278,6 +364,9 @@ discard block |
||
278 | 364 | */ |
279 | 365 | public function getObject($id): ?object; |
280 | 366 | |
367 | + /** |
|
368 | + * @return void |
|
369 | + */ |
|
281 | 370 | public function setSubject(?object $subject): void; |
282 | 371 | |
283 | 372 | /** |
@@ -289,6 +378,7 @@ discard block |
||
289 | 378 | * NEXT_MAJOR: Remove this method, since it's already in FieldDescriptionRegistryInterface. |
290 | 379 | * |
291 | 380 | * Returns a list FieldDescription. |
381 | + * @return null|FieldDescriptionInterface |
|
292 | 382 | */ |
293 | 383 | public function getListFieldDescription(string $name): ?FieldDescriptionInterface; |
294 | 384 | |
@@ -325,6 +415,7 @@ discard block |
||
325 | 415 | |
326 | 416 | /** |
327 | 417 | * Call before the batch action, allow you to alter the query and the idx. |
418 | + * @return void |
|
328 | 419 | */ |
329 | 420 | public function preBatchAction(string $actionName, ProxyQueryInterface $query, array &$idx, bool $allElements = false): void; |
330 | 421 | |
@@ -347,6 +438,7 @@ discard block |
||
347 | 438 | * |
348 | 439 | * @deprecated this feature cannot be stable, use a custom validator, |
349 | 440 | * the feature will be removed with Symfony 2.2 |
441 | + * @return void |
|
350 | 442 | */ |
351 | 443 | public function validate(ErrorElement $errorElement, $object): void; |
352 | 444 | |
@@ -354,6 +446,7 @@ discard block |
||
354 | 446 | |
355 | 447 | /** |
356 | 448 | * Add object security, fe. make the current user owner of the object. |
449 | + * @return void |
|
357 | 450 | */ |
358 | 451 | public function createObjectSecurity(object $object): void; |
359 | 452 | |
@@ -362,6 +455,9 @@ discard block |
||
362 | 455 | */ |
363 | 456 | public function getParent(): ?self; |
364 | 457 | |
458 | + /** |
|
459 | + * @return void |
|
460 | + */ |
|
365 | 461 | public function setParent(self $admin): void; |
366 | 462 | |
367 | 463 | /** |
@@ -373,6 +469,7 @@ discard block |
||
373 | 469 | * Set the translation domain. |
374 | 470 | * |
375 | 471 | * @param string $translationDomain the translation domain |
472 | + * @return void |
|
376 | 473 | */ |
377 | 474 | public function setTranslationDomain(string $translationDomain): void; |
378 | 475 | |
@@ -392,6 +489,7 @@ discard block |
||
392 | 489 | |
393 | 490 | /** |
394 | 491 | * Set the form groups. |
492 | + * @return void |
|
395 | 493 | */ |
396 | 494 | public function setFormGroups(array $formGroups): void; |
397 | 495 | |
@@ -400,6 +498,9 @@ discard block |
||
400 | 498 | */ |
401 | 499 | public function getFormTabs(): array; |
402 | 500 | |
501 | + /** |
|
502 | + * @return void |
|
503 | + */ |
|
403 | 504 | public function setFormTabs(array $formTabs): void; |
404 | 505 | |
405 | 506 | /** |
@@ -407,10 +508,14 @@ discard block |
||
407 | 508 | */ |
408 | 509 | public function getShowTabs(): array; |
409 | 510 | |
511 | + /** |
|
512 | + * @return void |
|
513 | + */ |
|
410 | 514 | public function setShowTabs(array $showTabs): void; |
411 | 515 | |
412 | 516 | /** |
413 | 517 | * Remove a form group field. |
518 | + * @return void |
|
414 | 519 | */ |
415 | 520 | public function removeFieldFromFormGroup(string $key): void; |
416 | 521 | |
@@ -423,11 +528,13 @@ discard block |
||
423 | 528 | |
424 | 529 | /** |
425 | 530 | * Set the show groups. |
531 | + * @return void |
|
426 | 532 | */ |
427 | 533 | public function setShowGroups(array $showGroups): void; |
428 | 534 | |
429 | 535 | /** |
430 | 536 | * Reorder items in showGroup. |
537 | + * @return void |
|
431 | 538 | */ |
432 | 539 | public function reorderShowGroup(string $group, array $keys): void; |
433 | 540 | |
@@ -435,6 +542,7 @@ discard block |
||
435 | 542 | * NEXT_MAJOR: Remove this method, since it's already in FieldDescriptionRegistryInterface. |
436 | 543 | * |
437 | 544 | * add a FieldDescription. |
545 | + * @return void |
|
438 | 546 | */ |
439 | 547 | public function addFormFieldDescription(string $name, FieldDescriptionInterface $fieldDescription): void; |
440 | 548 | |
@@ -442,6 +550,7 @@ discard block |
||
442 | 550 | * NEXT_MAJOR: Remove this method, since it's already in FieldDescriptionRegistryInterface. |
443 | 551 | * |
444 | 552 | * Remove a FieldDescription. |
553 | + * @return void |
|
445 | 554 | */ |
446 | 555 | public function removeFormFieldDescription(string $name): void; |
447 | 556 | |
@@ -459,11 +568,13 @@ discard block |
||
459 | 568 | * Adds a new class to a list of supported sub classes. |
460 | 569 | * |
461 | 570 | * @param $subClass |
571 | + * @return void |
|
462 | 572 | */ |
463 | 573 | public function addSubClass($subClass): void; |
464 | 574 | |
465 | 575 | /** |
466 | 576 | * Sets the list of supported sub classes. |
577 | + * @return void |
|
467 | 578 | */ |
468 | 579 | public function setSubClasses(array $subClasses): void; |
469 | 580 | |
@@ -502,6 +613,7 @@ discard block |
||
502 | 613 | |
503 | 614 | /** |
504 | 615 | * Returns Admin`s label. |
616 | + * @return string |
|
505 | 617 | */ |
506 | 618 | public function getLabel(): ?string; |
507 | 619 | |
@@ -516,6 +628,7 @@ discard block |
||
516 | 628 | |
517 | 629 | /** |
518 | 630 | * Set the current child status. |
631 | + * @return void |
|
519 | 632 | */ |
520 | 633 | public function setCurrentChild(bool $currentChild): void; |
521 | 634 | |
@@ -541,6 +654,9 @@ discard block |
||
541 | 654 | */ |
542 | 655 | public function getListModes(): array; |
543 | 656 | |
657 | + /** |
|
658 | + * @return void |
|
659 | + */ |
|
544 | 660 | public function setListMode(string $mode): void; |
545 | 661 | |
546 | 662 | /** |
@@ -565,12 +681,14 @@ discard block |
||
565 | 681 | |
566 | 682 | /** |
567 | 683 | * Returns the result link for an object. |
684 | + * @return string|null |
|
568 | 685 | */ |
569 | 686 | public function getSearchResultLink(object $object): ?string; |
570 | 687 | |
571 | 688 | /** |
572 | 689 | * Setting to true will enable mosaic button for the admin screen. |
573 | 690 | * Setting to false will hide mosaic button for the admin screen. |
691 | + * @return void |
|
574 | 692 | */ |
575 | 693 | public function showMosaicButton(bool $isShown): void; |
576 | 694 | |
@@ -596,6 +714,9 @@ discard block |
||
596 | 714 | */ |
597 | 715 | public function getRootCode(): string; |
598 | 716 | |
717 | + /** |
|
718 | + * @return void |
|
719 | + */ |
|
599 | 720 | public function setFilterPersister(?FilterPersisterInterface $filterPersister = null): void; |
600 | 721 | |
601 | 722 | /** |
@@ -608,28 +729,40 @@ discard block |
||
608 | 729 | */ |
609 | 730 | public function getBaseRouteName(): string; |
610 | 731 | |
732 | + /** |
|
733 | + * @param AbstractAdmin $childAdmin |
|
734 | + */ |
|
611 | 735 | public function getSideMenu(string $action, ?AdminInterface $childAdmin = null): \Knp\Menu\ItemInterface; |
612 | 736 | |
737 | + /** |
|
738 | + * @return void |
|
739 | + */ |
|
613 | 740 | public function addParentAssociationMapping(string $code, string $value): void; |
614 | 741 | |
615 | 742 | public function getRouteGenerator(): RouteGeneratorInterface; |
616 | 743 | |
617 | 744 | /** |
618 | 745 | * Returns the current child admin instance. |
746 | + * @return AdminInterface|null |
|
619 | 747 | */ |
620 | 748 | public function getCurrentChildAdmin(): ?AdminInterface; |
621 | 749 | |
622 | 750 | /** |
623 | 751 | * Returns the name of the parent related field, so the field can be use to set the default |
624 | 752 | * value (ie the parent object) or to filter the object. |
753 | + * @return string|null |
|
625 | 754 | */ |
626 | 755 | public function getParentAssociationMapping(): ?string; |
627 | 756 | |
757 | + /** |
|
758 | + * @return void |
|
759 | + */ |
|
628 | 760 | public function reorderFormGroup(string $group, array $keys): void; |
629 | 761 | |
630 | 762 | /** |
631 | 763 | * This method is being called by the main admin class and the child class, |
632 | 764 | * the getFormBuilder is only call by the main admin class. |
765 | + * @return void |
|
633 | 766 | */ |
634 | 767 | public function defineFormBuilder(FormBuilderInterface $formBuilder): void; |
635 | 768 | } |
@@ -13,7 +13,6 @@ |
||
13 | 13 | |
14 | 14 | namespace Sonata\AdminBundle\Admin; |
15 | 15 | |
16 | -use Doctrine\Inflector\Inflector; |
|
17 | 16 | use Doctrine\Inflector\InflectorFactory; |
18 | 17 | use Sonata\AdminBundle\Exception\NoValueException; |
19 | 18 |
@@ -26,6 +26,7 @@ discard block |
||
26 | 26 | { |
27 | 27 | /** |
28 | 28 | * set the field name. |
29 | + * @return void |
|
29 | 30 | */ |
30 | 31 | public function setFieldName(?string $fieldName): void; |
31 | 32 | |
@@ -38,6 +39,8 @@ discard block |
||
38 | 39 | |
39 | 40 | /** |
40 | 41 | * Set the name. |
42 | + * @param string $name |
|
43 | + * @return void |
|
41 | 44 | */ |
42 | 45 | public function setName(?string $name): void; |
43 | 46 | |
@@ -61,6 +64,7 @@ discard block |
||
61 | 64 | * Define an option, an option is has a name and a value. |
62 | 65 | * |
63 | 66 | * @param mixed $value |
67 | + * @return void |
|
64 | 68 | */ |
65 | 69 | public function setOption(string $name, $value): void; |
66 | 70 | |
@@ -72,6 +76,7 @@ discard block |
||
72 | 76 | * Then the value are copied across to the related property value. |
73 | 77 | * |
74 | 78 | * @param array<string, mixed> $options |
79 | + * @return void |
|
75 | 80 | */ |
76 | 81 | public function setOptions(array $options): void; |
77 | 82 | |
@@ -84,6 +89,7 @@ discard block |
||
84 | 89 | |
85 | 90 | /** |
86 | 91 | * Sets the template used to render the field. |
92 | + * @return void |
|
87 | 93 | */ |
88 | 94 | public function setTemplate(string $template): void; |
89 | 95 | |
@@ -97,16 +103,19 @@ discard block |
||
97 | 103 | /** |
98 | 104 | * Sets the field type. The type is a mandatory field as it's used to select the correct template |
99 | 105 | * or the logic associated to the current FieldDescription object. |
106 | + * @return void |
|
100 | 107 | */ |
101 | 108 | public function setType(?string $type): void; |
102 | 109 | |
103 | 110 | /** |
104 | 111 | * Returns the type. |
112 | + * @return string |
|
105 | 113 | */ |
106 | 114 | public function getType(): ?string; |
107 | 115 | |
108 | 116 | /** |
109 | 117 | * set the parent Admin (only used in nested admin). |
118 | + * @return void |
|
110 | 119 | */ |
111 | 120 | public function setParent(AdminInterface $parent); |
112 | 121 | |
@@ -169,6 +178,7 @@ discard block |
||
169 | 178 | * set the association admin instance (only used if the field is linked to an Admin). |
170 | 179 | * |
171 | 180 | * @param AdminInterface $associationAdmin the associated admin |
181 | + * @return void |
|
172 | 182 | */ |
173 | 183 | public function setAssociationAdmin(AdminInterface $associationAdmin); |
174 | 184 | |
@@ -196,6 +206,7 @@ discard block |
||
196 | 206 | |
197 | 207 | /** |
198 | 208 | * set the admin class linked to this FieldDescription. |
209 | + * @return void |
|
199 | 210 | */ |
200 | 211 | public function setAdmin(AdminInterface $admin); |
201 | 212 | |
@@ -211,11 +222,13 @@ discard block |
||
211 | 222 | * merge option values related to the provided option name. |
212 | 223 | * |
213 | 224 | * @throws \RuntimeException |
225 | + * @return void |
|
214 | 226 | */ |
215 | 227 | public function mergeOption(string $name, array $options = []): void; |
216 | 228 | |
217 | 229 | /** |
218 | 230 | * merge options values. |
231 | + * @return void |
|
219 | 232 | */ |
220 | 233 | public function mergeOptions(array $options = []): void; |
221 | 234 | |
@@ -223,6 +236,7 @@ discard block |
||
223 | 236 | * set the original mapping type (only used if the field is linked to an entity). |
224 | 237 | * |
225 | 238 | * @param string|int $mappingType |
239 | + * @return void |
|
226 | 240 | */ |
227 | 241 | public function setMappingType($mappingType); |
228 | 242 |
@@ -16,7 +16,6 @@ |
||
16 | 16 | use Doctrine\Inflector\InflectorFactory; |
17 | 17 | use Psr\Log\LoggerInterface; |
18 | 18 | use Psr\Log\NullLogger; |
19 | -use Sonata\AdminBundle\Admin\AbstractAdmin; |
|
20 | 19 | use Sonata\AdminBundle\Admin\AdminInterface; |
21 | 20 | use Sonata\AdminBundle\Admin\FieldDescriptionCollection; |
22 | 21 | use Sonata\AdminBundle\Datagrid\ProxyQueryInterface; |
@@ -182,6 +182,9 @@ |
||
182 | 182 | return $acls; |
183 | 183 | } |
184 | 184 | |
185 | + /** |
|
186 | + * @param UserSecurityIdentity $securityIdentity |
|
187 | + */ |
|
185 | 188 | public function addObjectOwner(AclInterface $acl, ?UserSecurityIdentity $securityIdentity = null): void |
186 | 189 | { |
187 | 190 | if (!$acl instanceof MutableAclInterface) { |