mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
Merge remote-tracking branch 'origin/upgrade-sf3' into upgrade-sf3
This commit is contained in:
commit
e5324c816e
@ -4,10 +4,12 @@ namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
|
||||
use Chill\MainBundle\Entity\Center;
|
||||
use Chill\MainBundle\Form\CenterType;
|
||||
|
||||
|
||||
/**
|
||||
* Center controller.
|
||||
*
|
||||
@ -62,12 +64,12 @@ class CenterController extends Controller
|
||||
*/
|
||||
private function createCreateForm(Center $center)
|
||||
{
|
||||
$form = $this->createForm(new CenterType(), $center, array(
|
||||
$form = $this->createForm(CenterType::class, $center, array(
|
||||
'action' => $this->generateUrl('admin_center_create'),
|
||||
'method' => 'POST',
|
||||
));
|
||||
|
||||
$form->add('submit', 'submit', array('label' => 'Create'));
|
||||
$form->add('submit', SubmitType::class, array('label' => 'Create'));
|
||||
|
||||
return $form;
|
||||
}
|
||||
@ -136,12 +138,12 @@ class CenterController extends Controller
|
||||
*/
|
||||
private function createEditForm(Center $center)
|
||||
{
|
||||
$form = $this->createForm(new CenterType(), $center, array(
|
||||
$form = $this->createForm(CenterType::class, $center, array(
|
||||
'action' => $this->generateUrl('admin_center_update', array('id' => $center->getId())),
|
||||
'method' => 'PUT',
|
||||
));
|
||||
|
||||
$form->add('submit', 'submit', array('label' => 'Update'));
|
||||
$form->add('submit', SubmitType::class, array('label' => 'Update'));
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ use Chill\MainBundle\Form\Type\Export\ExportType;
|
||||
use Chill\MainBundle\Form\Type\Export\FormatterType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\FormType;
|
||||
use Chill\MainBundle\Form\Type\Export\PickCenterType;
|
||||
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
|
||||
/**
|
||||
* ExportController is the controller use for exporting data.
|
||||
@ -245,7 +245,7 @@ class ExportController extends Controller
|
||||
));
|
||||
}
|
||||
|
||||
$builder->add('submit', 'submit', array(
|
||||
$builder->add('submit', SubmitType::class, array(
|
||||
'label' => 'Generate'
|
||||
));
|
||||
|
||||
|
@ -4,6 +4,7 @@ namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Chill\MainBundle\Entity\RoleScope;
|
||||
use Chill\MainBundle\Entity\PermissionsGroup;
|
||||
use Chill\MainBundle\Form\PermissionsGroupType;
|
||||
@ -67,12 +68,12 @@ class PermissionsGroupController extends Controller
|
||||
*/
|
||||
private function createCreateForm(PermissionsGroup $permissionsGroup)
|
||||
{
|
||||
$form = $this->createForm(new PermissionsGroupType(), $permissionsGroup, array(
|
||||
$form = $this->createForm(PermissionsGroupType::class, $permissionsGroup, array(
|
||||
'action' => $this->generateUrl('admin_permissionsgroup_create'),
|
||||
'method' => 'POST',
|
||||
));
|
||||
|
||||
$form->add('submit', 'submit', array('label' => 'Create'));
|
||||
$form->add('submit', SubmitType::class, array('label' => 'Create'));
|
||||
|
||||
return $form;
|
||||
}
|
||||
@ -228,12 +229,12 @@ class PermissionsGroupController extends Controller
|
||||
*/
|
||||
private function createEditForm(PermissionsGroup $permissionsGroup)
|
||||
{
|
||||
$form = $this->createForm(new PermissionsGroupType(), $permissionsGroup, array(
|
||||
$form = $this->createForm(PermissionsGroupType::class, $permissionsGroup, array(
|
||||
'action' => $this->generateUrl('admin_permissionsgroup_update', array('id' => $permissionsGroup->getId())),
|
||||
'method' => 'PUT',
|
||||
));
|
||||
|
||||
$form->add('submit', 'submit', array('label' => 'Update'));
|
||||
$form->add('submit', SubmitType::class, array('label' => 'Update'));
|
||||
|
||||
return $form;
|
||||
}
|
||||
@ -473,7 +474,7 @@ class PermissionsGroupController extends Controller
|
||||
->setAction($this->generateUrl('admin_permissionsgroup_delete_role_scope',
|
||||
array('pgid' => $permissionsGroup->getId(), 'rsid' => $roleScope->getId())))
|
||||
->setMethod('DELETE')
|
||||
->add('submit', 'submit', array('label' => 'Delete'))
|
||||
->add('submit', SubmitType::class, array('label' => 'Delete'))
|
||||
->getForm()
|
||||
;
|
||||
}
|
||||
@ -491,7 +492,7 @@ class PermissionsGroupController extends Controller
|
||||
array('id' => $permissionsGroup->getId())))
|
||||
->setMethod('PUT')
|
||||
->add('composed_role_scope', 'composed_role_scope')
|
||||
->add('submit', 'submit', array('label' => 'Add permission'))
|
||||
->add('submit', SubmitType::class, array('label' => 'Add permission'))
|
||||
->getForm()
|
||||
;
|
||||
}
|
||||
|
@ -4,10 +4,11 @@ namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
|
||||
use Chill\MainBundle\Entity\Scope;
|
||||
use Chill\MainBundle\Form\ScopeType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
|
||||
|
||||
/**
|
||||
* Scope controller.
|
||||
|
@ -4,6 +4,7 @@ namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Form\UserType;
|
||||
@ -11,6 +12,7 @@ use Chill\MainBundle\Entity\GroupCenter;
|
||||
use Chill\MainBundle\Form\Type\ComposedGroupCenterType;
|
||||
use Chill\MainBundle\Form\UserPasswordType;
|
||||
|
||||
|
||||
/**
|
||||
* User controller.
|
||||
*
|
||||
@ -71,13 +73,13 @@ class UserController extends Controller
|
||||
*/
|
||||
private function createCreateForm(User $entity)
|
||||
{
|
||||
$form = $this->createForm(new UserType(), $entity, array(
|
||||
$form = $this->createForm(UserType::class, $entity, array(
|
||||
'action' => $this->generateUrl('admin_user_create'),
|
||||
'method' => 'POST',
|
||||
'is_creation' => true
|
||||
));
|
||||
|
||||
$form->add('submit', 'submit', array('label' => 'Create'));
|
||||
$form->add('submit', SubmitType::class, array('label' => 'Create'));
|
||||
|
||||
return $form;
|
||||
}
|
||||
@ -175,12 +177,12 @@ class UserController extends Controller
|
||||
*/
|
||||
private function createEditPasswordForm(User $user)
|
||||
{
|
||||
return $this->createForm(new UserPasswordType(), $user, array(
|
||||
return $this->createForm(UserPasswordType::class, $user, array(
|
||||
'action' =>
|
||||
$this->generateUrl('admin_user_update_password', array('id' => $user->getId())),
|
||||
'method' => 'PUT'
|
||||
))
|
||||
->add('submit', 'submit', array('label' => 'Change password'))
|
||||
->add('submit', SubmitType::class, array('label' => 'Change password'))
|
||||
;
|
||||
}
|
||||
|
||||
@ -290,12 +292,12 @@ class UserController extends Controller
|
||||
*/
|
||||
private function createEditForm(User $user)
|
||||
{
|
||||
$form = $this->createForm(new UserType(), $user, array(
|
||||
$form = $this->createForm(UserType::class, $user, array(
|
||||
'action' => $this->generateUrl('admin_user_update', array('id' => $user->getId())),
|
||||
'method' => 'PUT',
|
||||
));
|
||||
|
||||
$form->add('submit', 'submit', array('label' => 'Update'));
|
||||
$form->add('submit', SubmitType::class, array('label' => 'Update'));
|
||||
|
||||
return $form;
|
||||
}
|
||||
@ -394,7 +396,7 @@ class UserController extends Controller
|
||||
->setAction($this->generateUrl('admin_user_delete_group_center',
|
||||
array('uid' => $user->getId(), 'gcid' => $groupCenter->getId())))
|
||||
->setMethod('DELETE')
|
||||
->add('submit', 'submit', array('label' => 'Delete'))
|
||||
->add('submit', SubmitType::class, array('label' => 'Delete'))
|
||||
->getForm()
|
||||
;
|
||||
}
|
||||
@ -412,7 +414,7 @@ class UserController extends Controller
|
||||
array('uid' => $user->getId())))
|
||||
->setMethod('POST')
|
||||
->add(self::FORM_GROUP_CENTER_COMPOSED, new ComposedGroupCenterType())
|
||||
->add('submit', 'submit', array('label' => 'Add a new groupCenter'))
|
||||
->add('submit', SubmitType::class, array('label' => 'Add a new groupCenter'))
|
||||
->getForm()
|
||||
;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user