@@ 386-403 (lines=18) @@ | ||
383 | * @param string $label |
|
384 | * @param array $options |
|
385 | */ |
|
386 | public function addImageField( |
|
387 | FormMapper $formMapper, |
|
388 | $name, |
|
389 | $label, |
|
390 | $options = [] |
|
391 | ) { |
|
392 | $this->doAddFileField( |
|
393 | $formMapper, |
|
394 | $name, |
|
395 | $label, |
|
396 | false, |
|
397 | [ |
|
398 | new Constraint\Image( |
|
399 | array_merge($this->imageConstraintOptions, $options) |
|
400 | ), |
|
401 | ] |
|
402 | ); |
|
403 | } |
|
404 | ||
405 | /** |
|
406 | * @param FormMapper $formMapper |
|
@@ 411-428 (lines=18) @@ | ||
408 | * @param $label |
|
409 | * @param array $options |
|
410 | */ |
|
411 | public function addRequiredImageField( |
|
412 | FormMapper $formMapper, |
|
413 | $name, |
|
414 | $label, |
|
415 | $options = [] |
|
416 | ) { |
|
417 | $this->doAddFileField( |
|
418 | $formMapper, |
|
419 | $name, |
|
420 | $label, |
|
421 | true, |
|
422 | [ |
|
423 | new Constraint\Image( |
|
424 | array_merge($this->imageConstraintOptions, $options) |
|
425 | ), |
|
426 | ] |
|
427 | ); |
|
428 | } |
|
429 | ||
430 | /** |
|
431 | * @param UploadedFile $file |