Commit 71a375b3 authored by Julien Minet's avatar Julien Minet

fix deprecations: use fqcn instead of 'choice'

parent 2ac4a841
Pipeline #45887 failed with stages
in 1 minute and 2 seconds
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment