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