diff --git a/src/lib/Form/Type/FieldType/ImageFieldType.php b/src/lib/Form/Type/FieldType/ImageFieldType.php index eec047b3..82e7df0a 100644 --- a/src/lib/Form/Type/FieldType/ImageFieldType.php +++ b/src/lib/Form/Type/FieldType/ImageFieldType.php @@ -58,6 +58,7 @@ public function buildView(FormView $view, FormInterface $form, array $options) { $view->vars += [ 'is_alternative_text_required' => $options['is_alternative_text_required'], + 'mime_types' => $options['mime_types'], ]; } @@ -66,9 +67,11 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setDefaults([ 'translation_domain' => 'ibexa_content_forms_fieldtype', 'is_alternative_text_required' => false, + 'mime_types' => [], ]); $resolver->setAllowedTypes('is_alternative_text_required', 'bool'); + $resolver->setAllowedTypes('mime_types', ['array']); } }