fix deprecations: use fqcn for chill classes

This commit is contained in:
nobohan 2018-04-04 12:18:06 +02:00
parent 75b4ef5a7d
commit ba79200e55
2 changed files with 23 additions and 19 deletions

View File

@ -24,7 +24,10 @@ namespace Chill\PersonBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Chill\PersonBundle\Form\Type\GenderType;
use Chill\MainBundle\Form\Type\Select2CountryType;
use Chill\MainBundle\Form\Type\Select2LanguageType;
class PersonType extends AbstractType
{
@ -76,19 +79,19 @@ class PersonType extends AbstractType
}
if ($this->config['country_of_birth'] === 'visible') {
$builder->add('countryOfBirth', 'select2_chill_country', array(
$builder->add('countryOfBirth', Select2CountryType::class, array(
'required' => false
));
}
if ($this->config['nationality'] === 'visible') {
$builder->add('nationality', 'select2_chill_country', array(
$builder->add('nationality', Select2CountryType::class, array(
'required' => false
));
}
if ($this->config['spoken_languages'] === 'visible') {
$builder->add('spokenLanguages', 'select2_chill_language', array(
$builder->add('spokenLanguages', Select2LanguageType::class, array(
'required' => false,
'multiple' => true
));

View File

@ -26,6 +26,7 @@ use Chill\MainBundle\Form\Type\DataTransformer\ObjectToIdTransformer;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Doctrine\Common\Persistence\ObjectManager;
use Chill\MainBundle\Form\Type\Select2ChoiceType;
/**
* A type to select the marital status
@ -51,7 +52,7 @@ class Select2MaritalStatusType extends AbstractType
}
public function getParent() {
return 'select2_choice';
return Select2ChoiceType::class;
}
public function buildForm(FormBuilderInterface $builder, array $options)