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