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