mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Use enumType in gender admin form
This commit is contained in:
parent
e629dbf994
commit
74593a7d28
@ -19,6 +19,7 @@ use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\EnumType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\NumberType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
@ -30,7 +31,8 @@ class GenderType extends AbstractType
|
||||
->add('label', TranslatableStringFormType::class, [
|
||||
'required' => true,
|
||||
])
|
||||
->add('icon', ChoiceType::class, [
|
||||
->add('icon', EnumType::class, [
|
||||
'class' => GenderIconEnum::class,
|
||||
'choices' => GenderIconEnum::cases(),
|
||||
'expanded' => true,
|
||||
'multiple' => false,
|
||||
@ -51,7 +53,7 @@ class GenderType extends AbstractType
|
||||
'Inactive' => false,
|
||||
],
|
||||
])
|
||||
->add('order', IntegerType::class);
|
||||
->add('order', NumberType::class);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
|
Loading…
x
Reference in New Issue
Block a user