mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-27 10:03:49 +00:00
fix deprecations: use fqcn for entity, ComposedGroupCenterType.
This commit is contained in:
@@ -22,6 +22,8 @@ namespace Chill\MainBundle\Form\Type;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
|
||||
use Chill\MainBundle\Entity\PermissionsGroup;
|
||||
use Chill\MainBundle\Entity\Center;
|
||||
|
||||
@@ -35,12 +37,12 @@ class ComposedGroupCenterType extends AbstractType
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder->add('permissionsgroup', 'entity', array(
|
||||
$builder->add('permissionsgroup', EntityType::class, array(
|
||||
'class' => 'Chill\MainBundle\Entity\PermissionsGroup',
|
||||
'choice_label' => function(PermissionsGroup $group) {
|
||||
return $group->getName();
|
||||
}
|
||||
))->add('center', 'entity', array(
|
||||
))->add('center', EntityType::class, array(
|
||||
'class' => 'Chill\MainBundle\Entity\Center',
|
||||
'choice_label' => function(Center $center) {
|
||||
return $center->getName();
|
||||
|
@@ -23,13 +23,16 @@ namespace Chill\MainBundle\Form\Type;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||
use Chill\MainBundle\Entity\Scope;
|
||||
use Chill\MainBundle\Security\RoleProvider;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\FormEvent;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||
use Chill\MainBundle\Entity\Scope;
|
||||
use Chill\MainBundle\Security\RoleProvider;
|
||||
|
||||
|
||||
/**
|
||||
* Form to Edit/create a role scope. If the role scope does not
|
||||
* exists in the database, he is generated.
|
||||
@@ -100,7 +103,7 @@ class ComposedRoleScopeType extends AbstractType
|
||||
return $this->roleProvider->getRoleTitle($role);
|
||||
}
|
||||
))
|
||||
->add('scope', 'entity', array(
|
||||
->add('scope', EntityType::class, array(
|
||||
'class' => 'ChillMainBundle:Scope',
|
||||
'choice_label' => function(Scope $scope) use ($translatableStringHelper) {
|
||||
return $translatableStringHelper->localize($scope->getName());
|
||||
|
Reference in New Issue
Block a user