mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
fix deprecations: getName, configureOptions, and use fqcn
This commit is contained in:
parent
ba79200e55
commit
2eb81ab3ec
@ -23,7 +23,8 @@ namespace Chill\PersonBundle\Form;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
|
||||
use Chill\PersonBundle\Form\Type\GenderType;
|
||||
use Chill\MainBundle\Form\Type\Select2CountryType;
|
||||
@ -63,7 +64,7 @@ class PersonType extends AbstractType
|
||||
->add('gender', new GenderType(), array(
|
||||
'required' => true
|
||||
))
|
||||
->add('memo', 'textarea', array('required' => false))
|
||||
->add('memo', TextareaType::class, array('required' => false))
|
||||
;
|
||||
|
||||
if ($this->config['place_of_birth'] === 'visible') {
|
||||
@ -71,11 +72,11 @@ class PersonType extends AbstractType
|
||||
}
|
||||
|
||||
if ($this->config['phonenumber'] === 'visible') {
|
||||
$builder->add('phonenumber', 'textarea', array('required' => false));
|
||||
$builder->add('phonenumber', TextareaType::class, array('required' => false));
|
||||
}
|
||||
|
||||
if ($this->config['email'] === 'visible') {
|
||||
$builder->add('email', 'textarea', array('required' => false));
|
||||
$builder->add('email', TextareaType::class, array('required' => false));
|
||||
}
|
||||
|
||||
if ($this->config['country_of_birth'] === 'visible') {
|
||||
@ -114,7 +115,7 @@ class PersonType extends AbstractType
|
||||
/**
|
||||
* @param OptionsResolverInterface $resolver
|
||||
*/
|
||||
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults(array(
|
||||
'data_class' => 'Chill\PersonBundle\Entity\Person',
|
||||
@ -125,15 +126,15 @@ class PersonType extends AbstractType
|
||||
'cFGroup'
|
||||
));
|
||||
|
||||
$resolver->setAllowedTypes(array(
|
||||
'cFGroup' => array('null', 'Chill\CustomFieldsBundle\Entity\CustomFieldsGroup')
|
||||
));
|
||||
$resolver->setAllowedTypes(
|
||||
'cFGroup', array('null', 'Chill\CustomFieldsBundle\Entity\CustomFieldsGroup')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'chill_personbundle_person';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user