Skip to content

Commit

Permalink
IBX-6856: Added view variable mime types for ezimage field type
Browse files Browse the repository at this point in the history
  • Loading branch information
ciastektk committed Dec 1, 2023
1 parent 601b5b4 commit 4d41c42
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/Form/Type/FieldType/ImageFieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
];
}

Expand All @@ -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']);
}
}

Expand Down

0 comments on commit 4d41c42

Please sign in to comment.