@@ 293-310 (lines=18) @@ | ||
290 | * @param string $label |
|
291 | * @param array $options |
|
292 | */ |
|
293 | public function addImageField( |
|
294 | FormMapper $formMapper, |
|
295 | $name, |
|
296 | $label, |
|
297 | $options = [] |
|
298 | ) { |
|
299 | $this->doAddFileField( |
|
300 | $formMapper, |
|
301 | $name, |
|
302 | $label, |
|
303 | false, |
|
304 | [ |
|
305 | new Constraint\Image( |
|
306 | array_merge($this->imageConstraintOptions, $options) |
|
307 | ), |
|
308 | ] |
|
309 | ); |
|
310 | } |
|
311 | ||
312 | /** |
|
313 | * @param FormMapper $formMapper |
|
@@ 318-335 (lines=18) @@ | ||
315 | * @param $label |
|
316 | * @param array $options |
|
317 | */ |
|
318 | public function addRequiredImageField( |
|
319 | FormMapper $formMapper, |
|
320 | $name, |
|
321 | $label, |
|
322 | $options = [] |
|
323 | ) { |
|
324 | $this->doAddFileField( |
|
325 | $formMapper, |
|
326 | $name, |
|
327 | $label, |
|
328 | true, |
|
329 | [ |
|
330 | new Constraint\Image( |
|
331 | array_merge($this->imageConstraintOptions, $options) |
|
332 | ), |
|
333 | ] |
|
334 | ); |
|
335 | } |
|
336 | ||
337 | /** |
|
338 | * @param UploadedFile $file |