@@ 352-369 (lines=18) @@ | ||
349 | * @param string $label |
|
350 | * @param array $options |
|
351 | */ |
|
352 | public function addImageField( |
|
353 | FormMapper $formMapper, |
|
354 | $name, |
|
355 | $label, |
|
356 | $options = [] |
|
357 | ) { |
|
358 | $this->doAddFileField( |
|
359 | $formMapper, |
|
360 | $name, |
|
361 | $label, |
|
362 | false, |
|
363 | [ |
|
364 | new Constraint\Image( |
|
365 | array_merge($this->imageConstraintOptions, $options) |
|
366 | ), |
|
367 | ] |
|
368 | ); |
|
369 | } |
|
370 | ||
371 | /** |
|
372 | * @param FormMapper $formMapper |
|
@@ 377-394 (lines=18) @@ | ||
374 | * @param $label |
|
375 | * @param array $options |
|
376 | */ |
|
377 | public function addRequiredImageField( |
|
378 | FormMapper $formMapper, |
|
379 | $name, |
|
380 | $label, |
|
381 | $options = [] |
|
382 | ) { |
|
383 | $this->doAddFileField( |
|
384 | $formMapper, |
|
385 | $name, |
|
386 | $label, |
|
387 | true, |
|
388 | [ |
|
389 | new Constraint\Image( |
|
390 | array_merge($this->imageConstraintOptions, $options) |
|
391 | ), |
|
392 | ] |
|
393 | ); |
|
394 | } |
|
395 | ||
396 | /** |
|
397 | * @param UploadedFile $file |