| @@ 346-363 (lines=18) @@ | ||
| 343 | * @param string $label |
|
| 344 | * @param array $options |
|
| 345 | */ |
|
| 346 | public function addImageField( |
|
| 347 | FormMapper $formMapper, |
|
| 348 | $name, |
|
| 349 | $label, |
|
| 350 | $options = [] |
|
| 351 | ) { |
|
| 352 | $this->doAddFileField( |
|
| 353 | $formMapper, |
|
| 354 | $name, |
|
| 355 | $label, |
|
| 356 | false, |
|
| 357 | [ |
|
| 358 | new Constraint\Image( |
|
| 359 | array_merge($this->imageConstraintOptions, $options) |
|
| 360 | ), |
|
| 361 | ] |
|
| 362 | ); |
|
| 363 | } |
|
| 364 | ||
| 365 | /** |
|
| 366 | * @param FormMapper $formMapper |
|
| @@ 371-388 (lines=18) @@ | ||
| 368 | * @param $label |
|
| 369 | * @param array $options |
|
| 370 | */ |
|
| 371 | public function addRequiredImageField( |
|
| 372 | FormMapper $formMapper, |
|
| 373 | $name, |
|
| 374 | $label, |
|
| 375 | $options = [] |
|
| 376 | ) { |
|
| 377 | $this->doAddFileField( |
|
| 378 | $formMapper, |
|
| 379 | $name, |
|
| 380 | $label, |
|
| 381 | true, |
|
| 382 | [ |
|
| 383 | new Constraint\Image( |
|
| 384 | array_merge($this->imageConstraintOptions, $options) |
|
| 385 | ), |
|
| 386 | ] |
|
| 387 | ); |
|
| 388 | } |
|
| 389 | ||
| 390 | /** |
|
| 391 | * @param UploadedFile $file |
|