@@ -586,6 +586,10 @@ |
||
586 | 586 | $this->admin->setShowBuilder(new ShowBuilder()); |
587 | 587 | } |
588 | 588 | |
589 | + /** |
|
590 | + * @param string $name |
|
591 | + * @param string $label |
|
592 | + */ |
|
589 | 593 | private function getFieldDescriptionMock(?string $name = null, ?string $label = null): BaseFieldDescription |
590 | 594 | { |
591 | 595 | $fieldDescription = $this->getMockForAbstractClass(BaseFieldDescription::class); |
@@ -44,6 +44,8 @@ |
||
44 | 44 | |
45 | 45 | /** |
46 | 46 | * @param FieldDescriptionInterface|string $name |
47 | + * @param string $type |
|
48 | + * @param string $fieldType |
|
47 | 49 | * |
48 | 50 | * @throws \LogicException |
49 | 51 | */ |
@@ -41,6 +41,7 @@ |
||
41 | 41 | |
42 | 42 | /** |
43 | 43 | * @param FieldDescriptionInterface|string $name |
44 | + * @param string $type |
|
44 | 45 | * |
45 | 46 | * @throws \LogicException |
46 | 47 | */ |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | /** |
183 | 183 | * render a view element. |
184 | 184 | * |
185 | - * @param object $object |
|
185 | + * @param \stdClass $object |
|
186 | 186 | * |
187 | 187 | * @return string |
188 | 188 | */ |
@@ -221,8 +221,8 @@ discard block |
||
221 | 221 | /** |
222 | 222 | * render a compared view element. |
223 | 223 | * |
224 | - * @param mixed $baseObject |
|
225 | - * @param mixed $compareObject |
|
224 | + * @param \stdClass $baseObject |
|
225 | + * @param \stdClass $compareObject |
|
226 | 226 | * |
227 | 227 | * @return string |
228 | 228 | */ |
@@ -343,7 +343,8 @@ discard block |
||
343 | 343 | /** |
344 | 344 | * Get the identifiers as a string that is safe to use in a url. |
345 | 345 | * |
346 | - * @param object $model |
|
346 | + * @param \stdClass $model |
|
347 | + * @param AdminInterface $admin |
|
347 | 348 | * |
348 | 349 | * @return string string representation of the id that is safe to use in a url |
349 | 350 | */ |
@@ -365,7 +366,7 @@ discard block |
||
365 | 366 | } |
366 | 367 | |
367 | 368 | /** |
368 | - * @return string|bool |
|
369 | + * @return string|false |
|
369 | 370 | */ |
370 | 371 | public function getXEditableType($type) |
371 | 372 | { |
@@ -43,7 +43,7 @@ |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
46 | - * @param FieldDescriptionInterface|string $name |
|
46 | + * @param \Sonata\AdminBundle\Admin\BaseFieldDescription $name |
|
47 | 47 | */ |
48 | 48 | public function addIdentifier($name, ?string $type = null, array $fieldDescriptionOptions = []): self |
49 | 49 | { |
@@ -414,6 +414,10 @@ |
||
414 | 414 | ); |
415 | 415 | } |
416 | 416 | |
417 | + /** |
|
418 | + * @param string $name |
|
419 | + * @param string $label |
|
420 | + */ |
|
417 | 421 | private function getFieldDescriptionMock(?string $name = null, ?string $label = null): BaseFieldDescription |
418 | 422 | { |
419 | 423 | $fieldDescription = $this->getMockForAbstractClass(BaseFieldDescription::class); |
@@ -37,26 +37,59 @@ discard block |
||
37 | 37 | */ |
38 | 38 | interface AdminInterface extends AccessRegistryInterface, FieldDescriptionRegistryInterface, LifecycleHookProviderInterface, MenuBuilderInterface, ParentAdminInterface, UrlGeneratorInterface |
39 | 39 | { |
40 | + /** |
|
41 | + * @return void |
|
42 | + */ |
|
40 | 43 | public function setMenuFactory(MenuFactoryInterface $menuFactory): void; |
41 | 44 | |
45 | + /** |
|
46 | + * @return MenuFactoryInterface |
|
47 | + */ |
|
42 | 48 | public function getMenuFactory(): ?MenuFactoryInterface; |
43 | 49 | |
50 | + /** |
|
51 | + * @return void |
|
52 | + */ |
|
44 | 53 | public function setFormContractor(FormContractorInterface $formContractor): void; |
45 | 54 | |
55 | + /** |
|
56 | + * @return void |
|
57 | + */ |
|
46 | 58 | public function setListBuilder(ListBuilderInterface $listBuilder): void; |
47 | 59 | |
60 | + /** |
|
61 | + * @return ListBuilderInterface |
|
62 | + */ |
|
48 | 63 | public function getListBuilder(): ?ListBuilderInterface; |
49 | 64 | |
65 | + /** |
|
66 | + * @return void |
|
67 | + */ |
|
50 | 68 | public function setDatagridBuilder(DatagridBuilderInterface $datagridBuilder): void; |
51 | 69 | |
70 | + /** |
|
71 | + * @return DatagridBuilderInterface |
|
72 | + */ |
|
52 | 73 | public function getDatagridBuilder(): ?DatagridBuilderInterface; |
53 | 74 | |
75 | + /** |
|
76 | + * @return void |
|
77 | + */ |
|
54 | 78 | public function setTranslator(TranslatorInterface $translator): void; |
55 | 79 | |
80 | + /** |
|
81 | + * @return TranslatorInterface |
|
82 | + */ |
|
56 | 83 | public function getTranslator(): ?TranslatorInterface; |
57 | 84 | |
85 | + /** |
|
86 | + * @return void |
|
87 | + */ |
|
58 | 88 | public function setRequest(Request $request): void; |
59 | 89 | |
90 | + /** |
|
91 | + * @return void |
|
92 | + */ |
|
60 | 93 | public function setConfigurationPool(Pool $pool): void; |
61 | 94 | |
62 | 95 | /** |
@@ -67,12 +100,19 @@ discard block |
||
67 | 100 | */ |
68 | 101 | public function getClass(): string; |
69 | 102 | |
103 | + /** |
|
104 | + * @return void |
|
105 | + */ |
|
70 | 106 | public function attachAdminClass(FieldDescriptionInterface $fieldDescription): void; |
71 | 107 | |
108 | + /** |
|
109 | + * @return DatagridInterface|null |
|
110 | + */ |
|
72 | 111 | public function getDatagrid(): ?DatagridInterface; |
73 | 112 | |
74 | 113 | /** |
75 | 114 | * Set base controller name. |
115 | + * @return void |
|
76 | 116 | */ |
77 | 117 | public function setBaseControllerName(string $baseControllerName): void; |
78 | 118 | |
@@ -83,14 +123,19 @@ discard block |
||
83 | 123 | |
84 | 124 | /** |
85 | 125 | * Sets a list of templates. |
126 | + * @return void |
|
86 | 127 | */ |
87 | 128 | public function setTemplates(array $templates): void; |
88 | 129 | |
89 | 130 | /** |
90 | 131 | * Sets a specific template. |
132 | + * @return void |
|
91 | 133 | */ |
92 | 134 | public function setTemplate(string $name, string $template): void; |
93 | 135 | |
136 | + /** |
|
137 | + * @return ModelManagerInterface |
|
138 | + */ |
|
94 | 139 | public function getModelManager(): ?ModelManagerInterface; |
95 | 140 | |
96 | 141 | /** |
@@ -110,6 +155,7 @@ discard block |
||
110 | 155 | |
111 | 156 | /** |
112 | 157 | * Returns a form depend on the given $object. |
158 | + * @return \Symfony\Component\Form\Form|null |
|
113 | 159 | */ |
114 | 160 | public function getForm(): ?FormInterface; |
115 | 161 | |
@@ -140,6 +186,9 @@ discard block |
||
140 | 186 | */ |
141 | 187 | public function getSecurityInformation(): array; |
142 | 188 | |
189 | + /** |
|
190 | + * @return void |
|
191 | + */ |
|
143 | 192 | public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription): void; |
144 | 193 | |
145 | 194 | /** |
@@ -179,8 +228,14 @@ discard block |
||
179 | 228 | */ |
180 | 229 | public function hasRoute(string $name): bool; |
181 | 230 | |
231 | + /** |
|
232 | + * @return void |
|
233 | + */ |
|
182 | 234 | public function setSecurityHandler(SecurityHandlerInterface $securityHandler): void; |
183 | 235 | |
236 | + /** |
|
237 | + * @return SecurityHandlerInterface |
|
238 | + */ |
|
184 | 239 | public function getSecurityHandler(): ?SecurityHandlerInterface; |
185 | 240 | |
186 | 241 | /** |
@@ -199,15 +254,28 @@ discard block |
||
199 | 254 | * Shorthand method for templating. |
200 | 255 | * |
201 | 256 | * @param object $model |
257 | + * @return string |
|
202 | 258 | */ |
203 | 259 | public function id($model): ?string; |
204 | 260 | |
261 | + /** |
|
262 | + * @return void |
|
263 | + */ |
|
205 | 264 | public function setValidator(ValidatorInterface $validator): void; |
206 | 265 | |
266 | + /** |
|
267 | + * @return ValidatorInterface |
|
268 | + */ |
|
207 | 269 | public function getValidator(): ?ValidatorInterface; |
208 | 270 | |
271 | + /** |
|
272 | + * @return FieldDescriptionCollection|null |
|
273 | + */ |
|
209 | 274 | public function getShow(): ?FieldDescriptionCollection; |
210 | 275 | |
276 | + /** |
|
277 | + * @return void |
|
278 | + */ |
|
211 | 279 | public function setFormTheme(array $formTheme): void; |
212 | 280 | |
213 | 281 | /** |
@@ -215,6 +283,9 @@ discard block |
||
215 | 283 | */ |
216 | 284 | public function getFormTheme(): array; |
217 | 285 | |
286 | + /** |
|
287 | + * @return void |
|
288 | + */ |
|
218 | 289 | public function setFilterTheme(array $filterTheme): void; |
219 | 290 | |
220 | 291 | /** |
@@ -222,6 +293,9 @@ discard block |
||
222 | 293 | */ |
223 | 294 | public function getFilterTheme(): array; |
224 | 295 | |
296 | + /** |
|
297 | + * @return void |
|
298 | + */ |
|
225 | 299 | public function addExtension(AdminExtensionInterface $extension): void; |
226 | 300 | |
227 | 301 | /** |
@@ -231,8 +305,14 @@ discard block |
||
231 | 305 | */ |
232 | 306 | public function getExtensions(): array; |
233 | 307 | |
308 | + /** |
|
309 | + * @return void |
|
310 | + */ |
|
234 | 311 | public function setRouteBuilder(RouteBuilderInterface $routeBuilder): void; |
235 | 312 | |
313 | + /** |
|
314 | + * @return RouteBuilderInterface |
|
315 | + */ |
|
236 | 316 | public function getRouteBuilder(): ?RouteBuilderInterface; |
237 | 317 | |
238 | 318 | /** |
@@ -240,8 +320,14 @@ discard block |
||
240 | 320 | */ |
241 | 321 | public function toString($object): string; |
242 | 322 | |
323 | + /** |
|
324 | + * @return void |
|
325 | + */ |
|
243 | 326 | public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy): void; |
244 | 327 | |
328 | + /** |
|
329 | + * @return LabelTranslatorStrategyInterface |
|
330 | + */ |
|
245 | 331 | public function getLabelTranslatorStrategy(): ?LabelTranslatorStrategyInterface; |
246 | 332 | |
247 | 333 | /** |
@@ -253,6 +339,9 @@ discard block |
||
253 | 339 | |
254 | 340 | public function getNewInstance(): object; |
255 | 341 | |
342 | + /** |
|
343 | + * @return void |
|
344 | + */ |
|
256 | 345 | public function setUniqid(string $uniqId): void; |
257 | 346 | |
258 | 347 | /** |
@@ -272,6 +361,9 @@ discard block |
||
272 | 361 | */ |
273 | 362 | public function getObject($id): ?object; |
274 | 363 | |
364 | + /** |
|
365 | + * @return void |
|
366 | + */ |
|
275 | 367 | public function setSubject(?object $subject): void; |
276 | 368 | |
277 | 369 | /** |
@@ -281,6 +373,7 @@ discard block |
||
281 | 373 | |
282 | 374 | /** |
283 | 375 | * Returns a list FieldDescription. |
376 | + * @return null|FieldDescriptionInterface |
|
284 | 377 | */ |
285 | 378 | public function getListFieldDescription(string $name): ?FieldDescriptionInterface; |
286 | 379 | |
@@ -313,6 +406,7 @@ discard block |
||
313 | 406 | |
314 | 407 | /** |
315 | 408 | * Call before the batch action, allow you to alter the query and the idx. |
409 | + * @return void |
|
316 | 410 | */ |
317 | 411 | public function preBatchAction(string $actionName, ProxyQueryInterface $query, array &$idx, bool $allElements = false): void; |
318 | 412 | |
@@ -335,6 +429,7 @@ discard block |
||
335 | 429 | * |
336 | 430 | * @deprecated this feature cannot be stable, use a custom validator, |
337 | 431 | * the feature will be removed with Symfony 2.2 |
432 | + * @return void |
|
338 | 433 | */ |
339 | 434 | public function validate(ErrorElement $errorElement, $object): void; |
340 | 435 | |
@@ -342,6 +437,7 @@ discard block |
||
342 | 437 | |
343 | 438 | /** |
344 | 439 | * Add object security, fe. make the current user owner of the object. |
440 | + * @return void |
|
345 | 441 | */ |
346 | 442 | public function createObjectSecurity(object $object): void; |
347 | 443 | |
@@ -350,6 +446,9 @@ discard block |
||
350 | 446 | */ |
351 | 447 | public function getParent(): ?self; |
352 | 448 | |
449 | + /** |
|
450 | + * @return void |
|
451 | + */ |
|
353 | 452 | public function setParent(self $admin): void; |
354 | 453 | |
355 | 454 | /** |
@@ -361,6 +460,7 @@ discard block |
||
361 | 460 | * Set the translation domain. |
362 | 461 | * |
363 | 462 | * @param string $translationDomain the translation domain |
463 | + * @return void |
|
364 | 464 | */ |
365 | 465 | public function setTranslationDomain(string $translationDomain): void; |
366 | 466 | |
@@ -380,6 +480,7 @@ discard block |
||
380 | 480 | |
381 | 481 | /** |
382 | 482 | * Set the form groups. |
483 | + * @return void |
|
383 | 484 | */ |
384 | 485 | public function setFormGroups(array $formGroups): void; |
385 | 486 | |
@@ -388,6 +489,9 @@ discard block |
||
388 | 489 | */ |
389 | 490 | public function getFormTabs(): array; |
390 | 491 | |
492 | + /** |
|
493 | + * @return void |
|
494 | + */ |
|
391 | 495 | public function setFormTabs(array $formTabs): void; |
392 | 496 | |
393 | 497 | /** |
@@ -395,10 +499,14 @@ discard block |
||
395 | 499 | */ |
396 | 500 | public function getShowTabs(): array; |
397 | 501 | |
502 | + /** |
|
503 | + * @return void |
|
504 | + */ |
|
398 | 505 | public function setShowTabs(array $showTabs): void; |
399 | 506 | |
400 | 507 | /** |
401 | 508 | * Remove a form group field. |
509 | + * @return void |
|
402 | 510 | */ |
403 | 511 | public function removeFieldFromFormGroup(string $key): void; |
404 | 512 | |
@@ -411,21 +519,25 @@ discard block |
||
411 | 519 | |
412 | 520 | /** |
413 | 521 | * Set the show groups. |
522 | + * @return void |
|
414 | 523 | */ |
415 | 524 | public function setShowGroups(array $showGroups): void; |
416 | 525 | |
417 | 526 | /** |
418 | 527 | * Reorder items in showGroup. |
528 | + * @return void |
|
419 | 529 | */ |
420 | 530 | public function reorderShowGroup(string $group, array $keys): void; |
421 | 531 | |
422 | 532 | /** |
423 | 533 | * add a FieldDescription. |
534 | + * @return void |
|
424 | 535 | */ |
425 | 536 | public function addFormFieldDescription(string $name, FieldDescriptionInterface $fieldDescription): void; |
426 | 537 | |
427 | 538 | /** |
428 | 539 | * Remove a FieldDescription. |
540 | + * @return void |
|
429 | 541 | */ |
430 | 542 | public function removeFormFieldDescription(string $name): void; |
431 | 543 | |
@@ -443,11 +555,13 @@ discard block |
||
443 | 555 | * Adds a new class to a list of supported sub classes. |
444 | 556 | * |
445 | 557 | * @param $subClass |
558 | + * @return void |
|
446 | 559 | */ |
447 | 560 | public function addSubClass($subClass): void; |
448 | 561 | |
449 | 562 | /** |
450 | 563 | * Sets the list of supported sub classes. |
564 | + * @return void |
|
451 | 565 | */ |
452 | 566 | public function setSubClasses(array $subClasses): void; |
453 | 567 | |
@@ -486,6 +600,7 @@ discard block |
||
486 | 600 | |
487 | 601 | /** |
488 | 602 | * Returns Admin`s label. |
603 | + * @return string |
|
489 | 604 | */ |
490 | 605 | public function getLabel(): ?string; |
491 | 606 | |
@@ -500,6 +615,7 @@ discard block |
||
500 | 615 | |
501 | 616 | /** |
502 | 617 | * Set the current child status. |
618 | + * @return void |
|
503 | 619 | */ |
504 | 620 | public function setCurrentChild(bool $currentChild): void; |
505 | 621 | |
@@ -525,6 +641,9 @@ discard block |
||
525 | 641 | */ |
526 | 642 | public function getListModes(): array; |
527 | 643 | |
644 | + /** |
|
645 | + * @return void |
|
646 | + */ |
|
528 | 647 | public function setListMode(string $mode): void; |
529 | 648 | |
530 | 649 | /** |
@@ -549,12 +668,14 @@ discard block |
||
549 | 668 | |
550 | 669 | /** |
551 | 670 | * Returns the result link for an object. |
671 | + * @return string|null |
|
552 | 672 | */ |
553 | 673 | public function getSearchResultLink(object $object): ?string; |
554 | 674 | |
555 | 675 | /** |
556 | 676 | * Setting to true will enable mosaic button for the admin screen. |
557 | 677 | * Setting to false will hide mosaic button for the admin screen. |
678 | + * @return void |
|
558 | 679 | */ |
559 | 680 | public function showMosaicButton(bool $isShown): void; |
560 | 681 |
@@ -70,6 +70,9 @@ |
||
70 | 70 | */ |
71 | 71 | protected $propertyAccessor; |
72 | 72 | |
73 | + /** |
|
74 | + * @param PropertyAccessorInterface $propertyAccessor |
|
75 | + */ |
|
73 | 76 | public function __construct( |
74 | 77 | ContainerInterface $container, |
75 | 78 | string $title, |
@@ -25,6 +25,7 @@ discard block |
||
25 | 25 | { |
26 | 26 | /** |
27 | 27 | * set the field name. |
28 | + * @return void |
|
28 | 29 | */ |
29 | 30 | public function setFieldName(?string $fieldName): void; |
30 | 31 | |
@@ -37,6 +38,7 @@ discard block |
||
37 | 38 | |
38 | 39 | /** |
39 | 40 | * Set the name. |
41 | + * @return void |
|
40 | 42 | */ |
41 | 43 | public function setName(?string $name): void; |
42 | 44 | |
@@ -60,6 +62,7 @@ discard block |
||
60 | 62 | * Define an option, an option is has a name and a value. |
61 | 63 | * |
62 | 64 | * @param mixed $value |
65 | + * @return void |
|
63 | 66 | */ |
64 | 67 | public function setOption(string $name, $value): void; |
65 | 68 | |
@@ -71,6 +74,7 @@ discard block |
||
71 | 74 | * Then the value are copied across to the related property value. |
72 | 75 | * |
73 | 76 | * @param array<string, mixed> $options |
77 | + * @return void |
|
74 | 78 | */ |
75 | 79 | public function setOptions(array $options): void; |
76 | 80 | |
@@ -83,6 +87,7 @@ discard block |
||
83 | 87 | |
84 | 88 | /** |
85 | 89 | * Sets the template used to render the field. |
90 | + * @return void |
|
86 | 91 | */ |
87 | 92 | public function setTemplate(string $template): void; |
88 | 93 | |
@@ -96,16 +101,19 @@ discard block |
||
96 | 101 | /** |
97 | 102 | * Sets the field type. The type is a mandatory field as it's used to select the correct template |
98 | 103 | * or the logic associated to the current FieldDescription object. |
104 | + * @return void |
|
99 | 105 | */ |
100 | 106 | public function setType(?string $type): void; |
101 | 107 | |
102 | 108 | /** |
103 | 109 | * Returns the type. |
110 | + * @return string |
|
104 | 111 | */ |
105 | 112 | public function getType(): ?string; |
106 | 113 | |
107 | 114 | /** |
108 | 115 | * set the parent Admin (only used in nested admin). |
116 | + * @return void |
|
109 | 117 | */ |
110 | 118 | public function setParent(AdminInterface $parent); |
111 | 119 | |
@@ -135,6 +143,7 @@ discard block |
||
135 | 143 | * Returns the related Target object model. |
136 | 144 | * |
137 | 145 | * @deprecated since sonata-project/admin-bundle 3.69. Use `getTargetModel()` instead. |
146 | + * @return string |
|
138 | 147 | */ |
139 | 148 | public function getTargetEntity(): ?string; |
140 | 149 | |
@@ -168,6 +177,7 @@ discard block |
||
168 | 177 | * set the association admin instance (only used if the field is linked to an Admin). |
169 | 178 | * |
170 | 179 | * @param AdminInterface $associationAdmin the associated admin |
180 | + * @return void |
|
171 | 181 | */ |
172 | 182 | public function setAssociationAdmin(AdminInterface $associationAdmin); |
173 | 183 | |
@@ -195,6 +205,7 @@ discard block |
||
195 | 205 | |
196 | 206 | /** |
197 | 207 | * set the admin class linked to this FieldDescription. |
208 | + * @return void |
|
198 | 209 | */ |
199 | 210 | public function setAdmin(AdminInterface $admin); |
200 | 211 | |
@@ -210,11 +221,13 @@ discard block |
||
210 | 221 | * merge option values related to the provided option name. |
211 | 222 | * |
212 | 223 | * @throws \RuntimeException |
224 | + * @return void |
|
213 | 225 | */ |
214 | 226 | public function mergeOption(string $name, array $options = []): void; |
215 | 227 | |
216 | 228 | /** |
217 | 229 | * merge options values. |
230 | + * @return void |
|
218 | 231 | */ |
219 | 232 | public function mergeOptions(array $options = []): void; |
220 | 233 | |
@@ -222,6 +235,7 @@ discard block |
||
222 | 235 | * set the original mapping type (only used if the field is linked to an entity). |
223 | 236 | * |
224 | 237 | * @param string|int $mappingType |
238 | + * @return void |
|
225 | 239 | */ |
226 | 240 | public function setMappingType($mappingType); |
227 | 241 |