mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
fix admin_event_status depreciations
This commit is contained in:
parent
9f168a3a3c
commit
cf93fc10fd
@ -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;
|
||||
|
||||
@ -62,12 +63,12 @@ class StatusController extends Controller
|
||||
*/
|
||||
private function createCreateForm(Status $entity)
|
||||
{
|
||||
$form = $this->createForm(new StatusType(), $entity, array(
|
||||
$form = $this->createForm(StatusType::class, $entity, array(
|
||||
'action' => $this->generateUrl('chill_event_admin_status_create'),
|
||||
'method' => 'POST',
|
||||
));
|
||||
|
||||
$form->add('submit', 'submit', array('label' => 'Create'));
|
||||
$form->add('submit', SubmitType::class, array('label' => 'Create'));
|
||||
|
||||
return $form;
|
||||
}
|
||||
@ -142,12 +143,12 @@ class StatusController extends Controller
|
||||
*/
|
||||
private function createEditForm(Status $entity)
|
||||
{
|
||||
$form = $this->createForm(new StatusType(), $entity, array(
|
||||
$form = $this->createForm(StatusType::class, $entity, array(
|
||||
'action' => $this->generateUrl('chill_event_admin_status_update', array('id' => $entity->getId())),
|
||||
'method' => 'PUT',
|
||||
));
|
||||
|
||||
$form->add('submit', 'submit', array('label' => 'Update'));
|
||||
$form->add('submit', SubmitType::class, array('label' => 'Update'));
|
||||
|
||||
return $form;
|
||||
}
|
||||
@ -217,7 +218,7 @@ class StatusController extends Controller
|
||||
return $this->createFormBuilder()
|
||||
->setAction($this->generateUrl('chill_event_admin_status_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