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