mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +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\Form\AbstractType;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
|
||||||
use Chill\PersonBundle\Entity\Person;
|
use Chill\PersonBundle\Entity\Person;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -12,24 +14,24 @@ use Chill\PersonBundle\Entity\Person;
|
|||||||
* @author julien
|
* @author julien
|
||||||
*/
|
*/
|
||||||
class GenderType extends AbstractType {
|
class GenderType extends AbstractType {
|
||||||
|
|
||||||
|
|
||||||
public function getName() {
|
public function getName() {
|
||||||
return 'gender';
|
return 'gender';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getParent() {
|
public function getParent() {
|
||||||
return 'choice';
|
return ChoiceType::class;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setDefaultOptions(OptionsResolverInterface $resolver) {
|
public function setDefaultOptions(OptionsResolverInterface $resolver) {
|
||||||
|
|
||||||
$a = array(
|
$a = array(
|
||||||
Person::MALE_GENDER => Person::MALE_GENDER,
|
Person::MALE_GENDER => Person::MALE_GENDER,
|
||||||
Person::FEMALE_GENDER => Person::FEMALE_GENDER
|
Person::FEMALE_GENDER => Person::FEMALE_GENDER
|
||||||
);
|
);
|
||||||
|
|
||||||
$resolver->setDefaults(array(
|
$resolver->setDefaults(array(
|
||||||
'choices' => $a,
|
'choices' => $a,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user