mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
fix deprecations: use fqcn instead of 'choice'
This commit is contained in:
parent
2ac4a84114
commit
71a375b37d
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user