mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
fix deprecations: use fqcn
This commit is contained in:
parent
0f1c4d1120
commit
4c4f4b5ca7
@ -4,9 +4,12 @@ namespace Chill\CustomFieldsBundle\Controller;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
|
||||
use Chill\CustomFieldsBundle\Entity\CustomField;
|
||||
use Chill\CustomFieldsBundle\Form\CustomFieldType;
|
||||
|
||||
|
||||
/**
|
||||
* CustomField controller.
|
||||
*
|
||||
@ -62,7 +65,7 @@ class CustomFieldController extends Controller
|
||||
'group_widget' => ($entity->getCustomFieldsGroup()) ? 'hidden' :'entity'
|
||||
));
|
||||
|
||||
$form->add('submit', 'submit', array('label' => 'Create'));
|
||||
$form->add('submit', SubmitType::class, array('label' => 'Create'));
|
||||
|
||||
return $form;
|
||||
}
|
||||
@ -154,7 +157,7 @@ class CustomFieldController extends Controller
|
||||
'group_widget' => 'hidden'
|
||||
));
|
||||
|
||||
$form->add('submit', 'submit', array('label' => 'Update'));
|
||||
$form->add('submit', SubmitType::class, array('label' => 'Update'));
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
@ -5,6 +5,8 @@ use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Form\FormEvent;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||
|
||||
use Chill\MainBundle\Form\Type\TranslatableStringFormType;
|
||||
|
||||
@ -26,10 +28,10 @@ class ChoicesListType extends AbstractType
|
||||
$locales = $this->defaultLocales;
|
||||
|
||||
$builder->add('name', TranslatableStringFormType::class)
|
||||
->add('active', 'checkbox', array(
|
||||
->add('active', CheckboxType::class, array(
|
||||
'required' => false
|
||||
))
|
||||
->add('slug', 'hidden', array(
|
||||
->add('slug', HiddenType::class, array(
|
||||
|
||||
))
|
||||
->addEventListener(FormEvents::SUBMIT, function(FormEvent $event) use ($locales){
|
||||
|
Loading…
x
Reference in New Issue
Block a user