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