@@ 374-391 (lines=18) @@ | ||
371 | * @param string $label |
|
372 | * @param array $options |
|
373 | */ |
|
374 | public function addImageField( |
|
375 | FormMapper $formMapper, |
|
376 | $name, |
|
377 | $label, |
|
378 | $options = [] |
|
379 | ) { |
|
380 | $this->doAddFileField( |
|
381 | $formMapper, |
|
382 | $name, |
|
383 | $label, |
|
384 | false, |
|
385 | [ |
|
386 | new Constraint\Image( |
|
387 | array_merge($this->imageConstraintOptions, $options) |
|
388 | ), |
|
389 | ] |
|
390 | ); |
|
391 | } |
|
392 | ||
393 | /** |
|
394 | * @param FormMapper $formMapper |
|
@@ 399-416 (lines=18) @@ | ||
396 | * @param $label |
|
397 | * @param array $options |
|
398 | */ |
|
399 | public function addRequiredImageField( |
|
400 | FormMapper $formMapper, |
|
401 | $name, |
|
402 | $label, |
|
403 | $options = [] |
|
404 | ) { |
|
405 | $this->doAddFileField( |
|
406 | $formMapper, |
|
407 | $name, |
|
408 | $label, |
|
409 | true, |
|
410 | [ |
|
411 | new Constraint\Image( |
|
412 | array_merge($this->imageConstraintOptions, $options) |
|
413 | ), |
|
414 | ] |
|
415 | ); |
|
416 | } |
|
417 | ||
418 | /** |
|
419 | * @param UploadedFile $file |