diff --git a/Form/Type/GenderType.php b/Form/Type/GenderType.php index a3caf2e7a..1292fd2a3 100644 --- a/Form/Type/GenderType.php +++ b/Form/Type/GenderType.php @@ -4,6 +4,8 @@ namespace Chill\PersonBundle\Form\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\OptionsResolver\OptionsResolverInterface; +use Symfony\Component\Form\Extension\Core\Type\ChoiceType; + use Chill\PersonBundle\Entity\Person; /** @@ -12,24 +14,24 @@ use Chill\PersonBundle\Entity\Person; * @author julien */ class GenderType extends AbstractType { - - + + public function getName() { return 'gender'; } - + public function getParent() { - return 'choice'; + return ChoiceType::class; } - + public function setDefaultOptions(OptionsResolverInterface $resolver) { - + $a = array( Person::MALE_GENDER => Person::MALE_GENDER, Person::FEMALE_GENDER => Person::FEMALE_GENDER ); - - $resolver->setDefaults(array( + + $resolver->setDefaults(array( 'choices' => $a, 'expanded' => true, 'multiple' => false,