Commit 2eb81ab3 authored by Julien Minet's avatar Julien Minet

fix deprecations: getName, configureOptions, and use fqcn

parent ba79200e
Pipeline #45849 failed with stages
in 1 minute and 4 seconds
......@@ -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';
}
......
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