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