Completed
Pull Request — master (#6197)
by Wojciech
08:23
created
src/Admin/AbstractAdmin.php 1 patch
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -1093,6 +1093,9 @@  discard block
 block discarded – undo
1093 1093
         return $this->routeGenerator->hasAdminRoute($this, $name);
1094 1094
     }
1095 1095
 
1096
+    /**
1097
+     * @param string $adminCode
1098
+     */
1096 1099
     public function isCurrentRoute(string $name, ?string $adminCode = null): bool
1097 1100
     {
1098 1101
         if (!$this->hasRequest()) {
@@ -1351,6 +1354,9 @@  discard block
 block discarded – undo
1351 1354
         return $this->baseControllerName;
1352 1355
     }
1353 1356
 
1357
+    /**
1358
+     * @param string $label
1359
+     */
1354 1360
     public function setLabel(?string $label): void
1355 1361
     {
1356 1362
         $this->label = $label;
@@ -2025,6 +2031,7 @@  discard block
 block discarded – undo
2025 2031
      *
2026 2032
      * NEXT_MAJOR: remove this method
2027 2033
      *
2034
+     * @param string $domain
2028 2035
      * @return string the translated string
2029 2036
      *
2030 2037
      * @deprecated since sonata-project/admin-bundle 3.9, to be removed with 4.0
@@ -2206,6 +2213,9 @@  discard block
 block discarded – undo
2206 2213
         return $this->managerType;
2207 2214
     }
2208 2215
 
2216
+    /**
2217
+     * @param string $type
2218
+     */
2209 2219
     public function setManagerType(?string $type): void
2210 2220
     {
2211 2221
         $this->managerType = $type;
@@ -2659,6 +2669,7 @@  discard block
 block discarded – undo
2659 2669
 
2660 2670
     /**
2661 2671
      * {@inheritdoc}
2672
+     * @param boolean $isShown
2662 2673
      */
2663 2674
     final public function showMosaicButton($isShown): void
2664 2675
     {
@@ -2813,6 +2824,7 @@  discard block
 block discarded – undo
2813 2824
 
2814 2825
     /**
2815 2826
      * Configures the tab menu in your admin.
2827
+     * @param string $action
2816 2828
      */
2817 2829
     protected function configureTabMenu(ItemInterface $menu, $action, ?AdminInterface $childAdmin = null)
2818 2830
     {
Please login to merge, or discard this patch.
src/Admin/AdminInterface.php 1 patch
Doc Comments   +142 added lines patch added patch discarded remove patch
@@ -40,26 +40,59 @@  discard block
 block discarded – undo
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(MenuFactoryInterface $menuFactory): void;
44 47
 
48
+    /**
49
+     * @return MenuFactoryInterface
50
+     */
45 51
     public function getMenuFactory(): ?MenuFactoryInterface;
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 TranslatorInterface
85
+     */
59 86
     public function getTranslator(): ?TranslatorInterface;
60 87
 
88
+    /**
89
+     * @return void
90
+     */
61 91
     public function setRequest(Request $request): void;
62 92
 
93
+    /**
94
+     * @return void
95
+     */
63 96
     public function setConfigurationPool(Pool $pool): void;
64 97
 
65 98
     /**
@@ -67,15 +100,20 @@  discard block
 block discarded – undo
67 100
      * - subclass name if subclass parameter is defined
68 101
      * - subject class name if subject is defined
69 102
      * - class name if not.
103
+     * @return string
70 104
      */
71 105
     public function getClass();
72 106
 
107
+    /**
108
+     * @return void
109
+     */
73 110
     public function attachAdminClass(FieldDescriptionInterface $fieldDescription): void;
74 111
 
75 112
     public function getDatagrid(): DatagridInterface;
76 113
 
77 114
     /**
78 115
      * Set base controller name.
116
+     * @return void
79 117
      */
80 118
     public function setBaseControllerName(string $baseControllerName): void;
81 119
 
@@ -86,14 +124,19 @@  discard block
 block discarded – undo
86 124
 
87 125
     /**
88 126
      * Sets a list of templates.
127
+     * @return void
89 128
      */
90 129
     public function setTemplates(array $templates): void;
91 130
 
92 131
     /**
93 132
      * Sets a specific template.
133
+     * @return void
94 134
      */
95 135
     public function setTemplate(string $name, string $template): void;
96 136
 
137
+    /**
138
+     * @return ModelManagerInterface
139
+     */
97 140
     public function getModelManager(): ?ModelManagerInterface;
98 141
 
99 142
     /**
@@ -103,6 +146,7 @@  discard block
 block discarded – undo
103 146
 
104 147
     /**
105 148
      * @param string $context NEXT_MAJOR: remove this argument
149
+     * @return ProxyQueryInterface
106 150
      */
107 151
     public function createQuery($context = 'list');
108 152
 
@@ -113,6 +157,7 @@  discard block
 block discarded – undo
113 157
 
114 158
     /**
115 159
      * Returns a form depend on the given $object.
160
+     * @return \Symfony\Component\Form\Form|null
116 161
      */
117 162
     public function getForm(): ?FormInterface;
118 163
 
@@ -143,6 +188,9 @@  discard block
 block discarded – undo
143 188
      */
144 189
     public function getSecurityInformation(): array;
145 190
 
191
+    /**
192
+     * @return void
193
+     */
146 194
     public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription): void;
147 195
 
148 196
     /**
@@ -182,8 +230,14 @@  discard block
 block discarded – undo
182 230
      */
183 231
     public function hasRoute(string $name): bool;
184 232
 
233
+    /**
234
+     * @return void
235
+     */
185 236
     public function setSecurityHandler(SecurityHandlerInterface $securityHandler): void;
186 237
 
238
+    /**
239
+     * @return SecurityHandlerInterface
240
+     */
187 241
     public function getSecurityHandler(): ?SecurityHandlerInterface;
188 242
 
189 243
     /**
@@ -202,17 +256,33 @@  discard block
 block discarded – undo
202 256
      * Shorthand method for templating.
203 257
      *
204 258
      * @param object $model
259
+     * @return string
205 260
      */
206 261
     public function id($model): ?string;
207 262
 
263
+    /**
264
+     * @return void
265
+     */
208 266
     public function setValidator(ValidatorInterface $validator): void;
209 267
 
268
+    /**
269
+     * @return ValidatorInterface
270
+     */
210 271
     public function getValidator(): ?ValidatorInterface;
211 272
 
273
+    /**
274
+     * @return FieldDescriptionCollection|null
275
+     */
212 276
     public function getShow(): ?FieldDescriptionCollection;
213 277
 
278
+    /**
279
+     * @return void
280
+     */
214 281
     public function setFormTheme(array $formTheme): void;
215 282
 
283
+    /**
284
+     * @return FieldDescriptionCollection|null
285
+     */
216 286
     public function getList(): ?FieldDescriptionCollection;
217 287
 
218 288
     /**
@@ -220,6 +290,9 @@  discard block
 block discarded – undo
220 290
      */
221 291
     public function getFormTheme(): array;
222 292
 
293
+    /**
294
+     * @return void
295
+     */
223 296
     public function setFilterTheme(array $filterTheme): void;
224 297
 
225 298
     /**
@@ -227,6 +300,9 @@  discard block
 block discarded – undo
227 300
      */
228 301
     public function getFilterTheme(): array;
229 302
 
303
+    /**
304
+     * @return void
305
+     */
230 306
     public function addExtension(AdminExtensionInterface $extension): void;
231 307
 
232 308
     /**
@@ -236,8 +312,14 @@  discard block
 block discarded – undo
236 312
      */
237 313
     public function getExtensions(): array;
238 314
 
315
+    /**
316
+     * @return void
317
+     */
239 318
     public function setRouteBuilder(RouteBuilderInterface $routeBuilder): void;
240 319
 
320
+    /**
321
+     * @return RouteBuilderInterface
322
+     */
241 323
     public function getRouteBuilder(): ?RouteBuilderInterface;
242 324
 
243 325
     /**
@@ -245,8 +327,14 @@  discard block
 block discarded – undo
245 327
      */
246 328
     public function toString($object): string;
247 329
 
330
+    /**
331
+     * @return void
332
+     */
248 333
     public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy): void;
249 334
 
335
+    /**
336
+     * @return LabelTranslatorStrategyInterface
337
+     */
250 338
     public function getLabelTranslatorStrategy(): ?LabelTranslatorStrategyInterface;
251 339
 
252 340
     /**
@@ -258,6 +346,9 @@  discard block
 block discarded – undo
258 346
 
259 347
     public function getNewInstance();
260 348
 
349
+    /**
350
+     * @return void
351
+     */
261 352
     public function setUniqid(string $uniqId): void;
262 353
 
263 354
     /**
@@ -277,6 +368,9 @@  discard block
 block discarded – undo
277 368
      */
278 369
     public function getObject($id);
279 370
 
371
+    /**
372
+     * @return void
373
+     */
280 374
     public function setSubject(?object $subject): void;
281 375
 
282 376
     /**
@@ -288,6 +382,7 @@  discard block
 block discarded – undo
288 382
      * NEXT_MAJOR: Remove this method, since it's already in FieldDescriptionRegistryInterface.
289 383
      *
290 384
      * Returns a list FieldDescription.
385
+     * @return null|FieldDescriptionInterface
291 386
      */
292 387
     public function getListFieldDescription(string $name): ?FieldDescriptionInterface;
293 388
 
@@ -314,6 +409,7 @@  discard block
 block discarded – undo
314 409
 
315 410
     /**
316 411
      * Retuns a list of exported fields.
412
+     * @return string[]
317 413
      */
318 414
     public function getExportFields();
319 415
 
@@ -324,6 +420,7 @@  discard block
 block discarded – undo
324 420
 
325 421
     /**
326 422
      * Call before the batch action, allow you to alter the query and the idx.
423
+     * @return void
327 424
      */
328 425
     public function preBatchAction($actionName, ProxyQueryInterface $query, array &$idx, $allElements);
329 426
 
@@ -346,6 +443,7 @@  discard block
 block discarded – undo
346 443
      *
347 444
      * @deprecated this feature cannot be stable, use a custom validator,
348 445
      *             the feature will be removed with Symfony 2.2
446
+     * @return void
349 447
      */
350 448
     public function validate(ErrorElement $errorElement, $object): void;
351 449
 
@@ -353,6 +451,7 @@  discard block
 block discarded – undo
353 451
 
354 452
     /**
355 453
      * Add object security, fe. make the current user owner of the object.
454
+     * @return void
356 455
      */
357 456
     public function createObjectSecurity(object $object): void;
358 457
 
@@ -361,6 +460,9 @@  discard block
 block discarded – undo
361 460
      */
362 461
     public function getParent(): ?self;
363 462
 
463
+    /**
464
+     * @return void
465
+     */
364 466
     public function setParent(self $admin): void;
365 467
 
366 468
     /**
@@ -372,6 +474,7 @@  discard block
 block discarded – undo
372 474
      * Set the translation domain.
373 475
      *
374 476
      * @param string $translationDomain the translation domain
477
+     * @return void
375 478
      */
376 479
     public function setTranslationDomain(string $translationDomain): void;
377 480
 
@@ -391,6 +494,7 @@  discard block
 block discarded – undo
391 494
 
392 495
     /**
393 496
      * Set the form groups.
497
+     * @return void
394 498
      */
395 499
     public function setFormGroups(array $formGroups): void;
396 500
 
@@ -399,6 +503,9 @@  discard block
 block discarded – undo
399 503
      */
400 504
     public function getFormTabs(): array;
401 505
 
506
+    /**
507
+     * @return void
508
+     */
402 509
     public function setFormTabs(array $formTabs): void;
403 510
 
404 511
     /**
@@ -406,10 +513,14 @@  discard block
 block discarded – undo
406 513
      */
407 514
     public function getShowTabs(): array;
408 515
 
516
+    /**
517
+     * @return void
518
+     */
409 519
     public function setShowTabs(array $showTabs): void;
410 520
 
411 521
     /**
412 522
      * Remove a form group field.
523
+     * @return void
413 524
      */
414 525
     public function removeFieldFromFormGroup(string $key): void;
415 526
 
@@ -422,11 +533,13 @@  discard block
 block discarded – undo
422 533
 
423 534
     /**
424 535
      * Set the show groups.
536
+     * @return void
425 537
      */
426 538
     public function setShowGroups(array $showGroups): void;
427 539
 
428 540
     /**
429 541
      * Reorder items in showGroup.
542
+     * @return void
430 543
      */
431 544
     public function reorderShowGroup(string $group, array $keys): void;
432 545
 
@@ -434,6 +547,7 @@  discard block
 block discarded – undo
434 547
      * NEXT_MAJOR: Remove this method, since it's already in FieldDescriptionRegistryInterface.
435 548
      *
436 549
      * add a FieldDescription.
550
+     * @return void
437 551
      */
438 552
     public function addFormFieldDescription(string $name, FieldDescriptionInterface $fieldDescription): void;
439 553
 
@@ -441,6 +555,7 @@  discard block
 block discarded – undo
441 555
      * NEXT_MAJOR: Remove this method, since it's already in FieldDescriptionRegistryInterface.
442 556
      *
443 557
      * Remove a FieldDescription.
558
+     * @return void
444 559
      */
445 560
     public function removeFormFieldDescription(string $name): void;
446 561
 
@@ -458,11 +573,13 @@  discard block
 block discarded – undo
458 573
      * Adds a new class to a list of supported sub classes.
459 574
      *
460 575
      * @param string $subClass
576
+     * @return void
461 577
      */
462 578
     public function addSubClass($subClass): void;
463 579
 
464 580
     /**
465 581
      * Sets the list of supported sub classes.
582
+     * @return void
466 583
      */
467 584
     public function setSubClasses(array $subClasses): void;
468 585
 
@@ -501,6 +618,7 @@  discard block
 block discarded – undo
501 618
 
502 619
     /**
503 620
      * Returns Admin`s label.
621
+     * @return string
504 622
      */
505 623
     public function getLabel(): ?string;
506 624
 
@@ -515,6 +633,7 @@  discard block
 block discarded – undo
515 633
 
516 634
     /**
517 635
      * Set the current child status.
636
+     * @return void
518 637
      */
519 638
     public function setCurrentChild(bool $currentChild): void;
520 639
 
@@ -532,6 +651,7 @@  discard block
 block discarded – undo
532 651
 
533 652
     /**
534 653
      * @param object $object
654
+     * @return \Sonata\AdminBundle\Object\Metadata
535 655
      */
536 656
     public function getObjectMetadata($object);
537 657
 
@@ -540,6 +660,9 @@  discard block
 block discarded – undo
540 660
      */
541 661
     public function getListModes(): array;
542 662
 
663
+    /**
664
+     * @return void
665
+     */
543 666
     public function setListMode(string $mode): void;
544 667
 
545 668
     /**
@@ -564,12 +687,14 @@  discard block
 block discarded – undo
564 687
 
565 688
     /**
566 689
      * Returns the result link for an object.
690
+     * @return string|null
567 691
      */
568 692
     public function getSearchResultLink(object $object): ?string;
569 693
 
570 694
     /**
571 695
      * Setting to true will enable mosaic button for the admin screen.
572 696
      * Setting to false will hide mosaic button for the admin screen.
697
+     * @return void
573 698
      */
574 699
     public function showMosaicButton(bool $isShown): void;
575 700
 
@@ -595,6 +720,9 @@  discard block
 block discarded – undo
595 720
      */
596 721
     public function getRootCode(): string;
597 722
 
723
+    /**
724
+     * @return void
725
+     */
598 726
     public function setFilterPersister(?FilterPersisterInterface $filterPersister = null): void;
599 727
 
600 728
     /**
@@ -607,14 +735,24 @@  discard block
 block discarded – undo
607 735
      */
608 736
     public function getBaseRouteName(): string;
609 737
 
738
+    /**
739
+     * @param AbstractAdmin $childAdmin
740
+     */
610 741
     public function getSideMenu(string $action, ?self $childAdmin = null): ItemInterface;
611 742
 
743
+    /**
744
+     * @return void
745
+     */
612 746
     public function addParentAssociationMapping(string $code, string $value): void;
613 747
 
748
+    /**
749
+     * @return RouteGeneratorInterface|null
750
+     */
614 751
     public function getRouteGenerator(): ?RouteGeneratorInterface;
615 752
 
616 753
     /**
617 754
      * Returns the current child admin instance.
755
+     * @return AdminInterface|null
618 756
      */
619 757
     public function getCurrentChildAdmin(): ?self;
620 758
 
@@ -624,11 +762,15 @@  discard block
 block discarded – undo
624 762
      */
625 763
     public function getParentAssociationMapping(): ?string;
626 764
 
765
+    /**
766
+     * @return void
767
+     */
627 768
     public function reorderFormGroup(string $group, array $keys): void;
628 769
 
629 770
     /**
630 771
      * This method is being called by the main admin class and the child class,
631 772
      * the getFormBuilder is only call by the main admin class.
773
+     * @return void
632 774
      */
633 775
     public function defineFormBuilder(FormBuilderInterface $formBuilder): void;
634 776
 }
Please login to merge, or discard this patch.