mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
fix admin_event_role depreciations
This commit is contained in:
parent
7de5cf03b6
commit
403d1749e3
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace Chill\EventBundle\Controller;
|
namespace Chill\EventBundle\Controller;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
|
|
||||||
@ -63,12 +64,12 @@ class RoleController extends Controller
|
|||||||
*/
|
*/
|
||||||
private function createCreateForm(Role $entity)
|
private function createCreateForm(Role $entity)
|
||||||
{
|
{
|
||||||
$form = $this->createForm($this->get('chill.event.form.role_type'), $entity, array(
|
$form = $this->createForm(RoleType::class, $entity, array(
|
||||||
'action' => $this->generateUrl('chill_event_admin_role_create'),
|
'action' => $this->generateUrl('chill_event_admin_role_create'),
|
||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
));
|
));
|
||||||
|
|
||||||
$form->add('submit', 'submit', array('label' => 'Create'));
|
$form->add('submit', SubmitType::class, array('label' => 'Create'));
|
||||||
|
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
@ -143,13 +144,13 @@ class RoleController extends Controller
|
|||||||
*/
|
*/
|
||||||
private function createEditForm(Role $entity)
|
private function createEditForm(Role $entity)
|
||||||
{
|
{
|
||||||
$form = $this->createForm($this->get('chill.event.form.role_type'), $entity, array(
|
$form = $this->createForm(RoleType::class, $entity, array(
|
||||||
'action' => $this->generateUrl('chill_event_admin_role_update',
|
'action' => $this->generateUrl('chill_event_admin_role_update',
|
||||||
array('id' => $entity->getId())),
|
array('id' => $entity->getId())),
|
||||||
'method' => 'PUT',
|
'method' => 'PUT',
|
||||||
));
|
));
|
||||||
|
|
||||||
$form->add('submit', 'submit', array('label' => 'Update'));
|
$form->add('submit', SubmitType::class, array('label' => 'Update'));
|
||||||
|
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
@ -220,7 +221,7 @@ class RoleController extends Controller
|
|||||||
return $this->createFormBuilder()
|
return $this->createFormBuilder()
|
||||||
->setAction($this->generateUrl('chill_event_admin_role_delete', array('id' => $id)))
|
->setAction($this->generateUrl('chill_event_admin_role_delete', array('id' => $id)))
|
||||||
->setMethod('DELETE')
|
->setMethod('DELETE')
|
||||||
->add('submit', 'submit', array('label' => 'Delete'))
|
->add('submit', SubmitType::class, array('label' => 'Delete'))
|
||||||
->getForm()
|
->getForm()
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user