mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
fix routes and translatable string in admin prototype
ref #12 ref #13 ref #14 ref #15
This commit is contained in:
@@ -44,7 +44,8 @@ class EventTypeController extends Controller
|
||||
$em->persist($entity);
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('{_locale}_admin_show', array('id' => $entity->getId())));
|
||||
return $this->redirect($this->generateUrl('chill_eventtype_admin_show',
|
||||
array('id' => $entity->getId())));
|
||||
}
|
||||
|
||||
return $this->render('ChillEventBundle:EventType:new.html.twig', array(
|
||||
@@ -63,7 +64,7 @@ class EventTypeController extends Controller
|
||||
private function createCreateForm(EventType $entity)
|
||||
{
|
||||
$form = $this->createForm(new EventTypeType(), $entity, array(
|
||||
'action' => $this->generateUrl('{_locale}_admin_create'),
|
||||
'action' => $this->generateUrl('chill_eventtype_admin_create'),
|
||||
'method' => 'POST',
|
||||
));
|
||||
|
||||
@@ -143,7 +144,8 @@ class EventTypeController extends Controller
|
||||
private function createEditForm(EventType $entity)
|
||||
{
|
||||
$form = $this->createForm(new EventTypeType(), $entity, array(
|
||||
'action' => $this->generateUrl('{_locale}_admin_update', array('id' => $entity->getId())),
|
||||
'action' => $this->generateUrl('chill_eventtype_admin_update',
|
||||
array('id' => $entity->getId())),
|
||||
'method' => 'PUT',
|
||||
));
|
||||
|
||||
@@ -172,7 +174,8 @@ class EventTypeController extends Controller
|
||||
if ($editForm->isValid()) {
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('{_locale}_admin_edit', array('id' => $id)));
|
||||
return $this->redirect($this->generateUrl('chill_eventtype_admin_edit',
|
||||
array('id' => $id)));
|
||||
}
|
||||
|
||||
return $this->render('ChillEventBundle:EventType:edit.html.twig', array(
|
||||
@@ -202,7 +205,7 @@ class EventTypeController extends Controller
|
||||
$em->flush();
|
||||
}
|
||||
|
||||
return $this->redirect($this->generateUrl('{_locale}_admin'));
|
||||
return $this->redirect($this->generateUrl('chill_eventtype_admin'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -215,7 +218,8 @@ class EventTypeController extends Controller
|
||||
private function createDeleteForm($id)
|
||||
{
|
||||
return $this->createFormBuilder()
|
||||
->setAction($this->generateUrl('{_locale}_admin_delete', array('id' => $id)))
|
||||
->setAction($this->generateUrl('chill_eventtype_admin_delete',
|
||||
array('id' => $id)))
|
||||
->setMethod('DELETE')
|
||||
->add('submit', 'submit', array('label' => 'Delete'))
|
||||
->getForm()
|
||||
|
@@ -44,7 +44,8 @@ class RoleController extends Controller
|
||||
$em->persist($entity);
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('{_locale}_admin_role_show', array('id' => $entity->getId())));
|
||||
return $this->redirect($this->generateUrl('chill_event_admin_role_show',
|
||||
array('id' => $entity->getId())));
|
||||
}
|
||||
|
||||
return $this->render('ChillEventBundle:Role:new.html.twig', array(
|
||||
@@ -62,8 +63,8 @@ class RoleController extends Controller
|
||||
*/
|
||||
private function createCreateForm(Role $entity)
|
||||
{
|
||||
$form = $this->createForm(new RoleType(), $entity, array(
|
||||
'action' => $this->generateUrl('{_locale}_admin_role_create'),
|
||||
$form = $this->createForm($this->get('chill.event.form.role_type'), $entity, array(
|
||||
'action' => $this->generateUrl('chill_event_admin_role_create'),
|
||||
'method' => 'POST',
|
||||
));
|
||||
|
||||
@@ -142,8 +143,9 @@ class RoleController extends Controller
|
||||
*/
|
||||
private function createEditForm(Role $entity)
|
||||
{
|
||||
$form = $this->createForm(new RoleType(), $entity, array(
|
||||
'action' => $this->generateUrl('{_locale}_admin_role_update', array('id' => $entity->getId())),
|
||||
$form = $this->createForm($this->get('chill.event.form.role_type'), $entity, array(
|
||||
'action' => $this->generateUrl('chill_event_admin_role_update',
|
||||
array('id' => $entity->getId())),
|
||||
'method' => 'PUT',
|
||||
));
|
||||
|
||||
@@ -172,7 +174,8 @@ class RoleController extends Controller
|
||||
if ($editForm->isValid()) {
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('{_locale}_admin_role_edit', array('id' => $id)));
|
||||
return $this->redirect($this->generateUrl('chill_event_admin_role_edit',
|
||||
array('id' => $id)));
|
||||
}
|
||||
|
||||
return $this->render('ChillEventBundle:Role:edit.html.twig', array(
|
||||
@@ -202,7 +205,7 @@ class RoleController extends Controller
|
||||
$em->flush();
|
||||
}
|
||||
|
||||
return $this->redirect($this->generateUrl('{_locale}_admin_role'));
|
||||
return $this->redirect($this->generateUrl('chill_event_admin_role'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -215,7 +218,7 @@ class RoleController extends Controller
|
||||
private function createDeleteForm($id)
|
||||
{
|
||||
return $this->createFormBuilder()
|
||||
->setAction($this->generateUrl('{_locale}_admin_role_delete', array('id' => $id)))
|
||||
->setAction($this->generateUrl('chill_event_admin_role_delete', array('id' => $id)))
|
||||
->setMethod('DELETE')
|
||||
->add('submit', 'submit', array('label' => 'Delete'))
|
||||
->getForm()
|
||||
|
@@ -44,7 +44,7 @@ class StatusController extends Controller
|
||||
$em->persist($entity);
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('fr_admin_event_status_show', array('id' => $entity->getId())));
|
||||
return $this->redirect($this->generateUrl('chill_event_admin_status_show', array('id' => $entity->getId())));
|
||||
}
|
||||
|
||||
return $this->render('ChillEventBundle:Status:new.html.twig', array(
|
||||
@@ -63,7 +63,7 @@ class StatusController extends Controller
|
||||
private function createCreateForm(Status $entity)
|
||||
{
|
||||
$form = $this->createForm(new StatusType(), $entity, array(
|
||||
'action' => $this->generateUrl('fr_admin_event_status_create'),
|
||||
'action' => $this->generateUrl('chill_event_admin_status_create'),
|
||||
'method' => 'POST',
|
||||
));
|
||||
|
||||
@@ -143,7 +143,7 @@ class StatusController extends Controller
|
||||
private function createEditForm(Status $entity)
|
||||
{
|
||||
$form = $this->createForm(new StatusType(), $entity, array(
|
||||
'action' => $this->generateUrl('fr_admin_event_status_update', array('id' => $entity->getId())),
|
||||
'action' => $this->generateUrl('chill_event_admin_status_update', array('id' => $entity->getId())),
|
||||
'method' => 'PUT',
|
||||
));
|
||||
|
||||
@@ -172,7 +172,7 @@ class StatusController extends Controller
|
||||
if ($editForm->isValid()) {
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('fr_admin_event_status_edit', array('id' => $id)));
|
||||
return $this->redirect($this->generateUrl('chill_event_admin_status_edit', array('id' => $id)));
|
||||
}
|
||||
|
||||
return $this->render('ChillEventBundle:Status:edit.html.twig', array(
|
||||
@@ -202,7 +202,7 @@ class StatusController extends Controller
|
||||
$em->flush();
|
||||
}
|
||||
|
||||
return $this->redirect($this->generateUrl('fr_admin_event_status'));
|
||||
return $this->redirect($this->generateUrl('chill_event_admin_status'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -215,7 +215,7 @@ class StatusController extends Controller
|
||||
private function createDeleteForm($id)
|
||||
{
|
||||
return $this->createFormBuilder()
|
||||
->setAction($this->generateUrl('fr_admin_event_status_delete', array('id' => $id)))
|
||||
->setAction($this->generateUrl('chill_event_admin_status_delete', array('id' => $id)))
|
||||
->setMethod('DELETE')
|
||||
->add('submit', 'submit', array('label' => 'Delete'))
|
||||
->getForm()
|
||||
|
Reference in New Issue
Block a user