{{ 'Name'|trans }} |
@@ -22,9 +22,6 @@
- -
-
-
-
diff --git a/src/Bundle/ChillEventBundle/Controller/EventTypeController.php b/src/Bundle/ChillEventBundle/Controller/EventTypeController.php
index 97719d64d..969e60cb7 100644
--- a/src/Bundle/ChillEventBundle/Controller/EventTypeController.php
+++ b/src/Bundle/ChillEventBundle/Controller/EventTypeController.php
@@ -48,30 +48,6 @@ class EventTypeController extends AbstractController
]);
}
- /**
- * Deletes a EventType entity.
- */
- #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/event_type/{id}/delete', name: 'chill_eventtype_admin_delete', methods: ['POST', 'DELETE'])]
- public function deleteAction(Request $request, mixed $id)
- {
- $form = $this->createDeleteForm($id);
- $form->handleRequest($request);
-
- if ($form->isSubmitted() && $form->isValid()) {
- $em = $this->managerRegistry->getManager();
- $entity = $em->getRepository(EventType::class)->find($id);
-
- if (!$entity) {
- throw $this->createNotFoundException('Unable to find EventType entity.');
- }
-
- $em->remove($entity);
- $em->flush();
- }
-
- return $this->redirectToRoute('chill_eventtype_admin');
- }
-
/**
* Displays a form to edit an existing EventType entity.
*/
@@ -124,28 +100,6 @@ class EventTypeController extends AbstractController
]);
}
- /**
- * Finds and displays a EventType entity.
- */
- #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/event_type/{id}/show', name: 'chill_eventtype_admin_show')]
- public function showAction(mixed $id)
- {
- $em = $this->managerRegistry->getManager();
-
- $entity = $em->getRepository(EventType::class)->find($id);
-
- if (!$entity) {
- throw $this->createNotFoundException('Unable to find EventType entity.');
- }
-
- $deleteForm = $this->createDeleteForm($id);
-
- return $this->render('@ChillEvent/EventType/show.html.twig', [
- 'entity' => $entity,
- 'delete_form' => $deleteForm->createView(),
- ]);
- }
-
/**
* Edits an existing EventType entity.
*/
@@ -160,7 +114,6 @@ class EventTypeController extends AbstractController
throw $this->createNotFoundException('Unable to find EventType entity.');
}
- $deleteForm = $this->createDeleteForm($id);
$editForm = $this->createEditForm($entity);
$editForm->handleRequest($request);
@@ -173,7 +126,6 @@ class EventTypeController extends AbstractController
return $this->render('@ChillEvent/EventType/edit.html.twig', [
'entity' => $entity,
'edit_form' => $editForm->createView(),
- 'delete_form' => $deleteForm->createView(),
]);
}
@@ -196,22 +148,6 @@ class EventTypeController extends AbstractController
return $form;
}
- /**
- * Creates a form to delete a EventType entity by id.
- *
- * @return \Symfony\Component\Form\FormInterface The form
- */
- private function createDeleteForm(mixed $id)
- {
- return $this->createFormBuilder()
- ->setAction($this->generateUrl(
- 'chill_eventtype_admin_delete',
- ['id' => $id]
- ))
- ->add('submit', SubmitType::class, ['label' => 'Delete'])
- ->getForm();
- }
-
/**
* Creates a form to edit a EventType entity.
*
diff --git a/src/Bundle/ChillEventBundle/Controller/RoleController.php b/src/Bundle/ChillEventBundle/Controller/RoleController.php
index 10e978a6b..9d0c38c92 100644
--- a/src/Bundle/ChillEventBundle/Controller/RoleController.php
+++ b/src/Bundle/ChillEventBundle/Controller/RoleController.php
@@ -48,30 +48,6 @@ class RoleController extends AbstractController
]);
}
- /**
- * Deletes a Role entity.
- */
- #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/role/{id}/delete', name: 'chill_event_admin_role_delete', methods: ['POST', 'DELETE'])]
- public function deleteAction(Request $request, mixed $id)
- {
- $form = $this->createDeleteForm($id);
- $form->handleRequest($request);
-
- if ($form->isSubmitted() && $form->isValid()) {
- $em = $this->managerRegistry->getManager();
- $entity = $em->getRepository(Role::class)->find($id);
-
- if (!$entity) {
- throw $this->createNotFoundException('Unable to find Role entity.');
- }
-
- $em->remove($entity);
- $em->flush();
- }
-
- return $this->redirectToRoute('chill_event_admin_role');
- }
-
/**
* Displays a form to edit an existing Role entity.
*/
@@ -87,12 +63,10 @@ class RoleController extends AbstractController
}
$editForm = $this->createEditForm($entity);
- $deleteForm = $this->createDeleteForm($id);
return $this->render('@ChillEvent/Role/edit.html.twig', [
'entity' => $entity,
'edit_form' => $editForm->createView(),
- 'delete_form' => $deleteForm->createView(),
]);
}
@@ -126,28 +100,6 @@ class RoleController extends AbstractController
]);
}
- /**
- * Finds and displays a Role entity.
- */
- #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/role/{id}/show', name: 'chill_event_admin_role_show')]
- public function showAction(mixed $id)
- {
- $em = $this->managerRegistry->getManager();
-
- $entity = $em->getRepository(Role::class)->find($id);
-
- if (!$entity) {
- throw $this->createNotFoundException('Unable to find Role entity.');
- }
-
- $deleteForm = $this->createDeleteForm($id);
-
- return $this->render('@ChillEvent/Role/show.html.twig', [
- 'entity' => $entity,
- 'delete_form' => $deleteForm->createView(),
- ]);
- }
-
/**
* Edits an existing Role entity.
*/
@@ -162,7 +114,6 @@ class RoleController extends AbstractController
throw $this->createNotFoundException('Unable to find Role entity.');
}
- $deleteForm = $this->createDeleteForm($id);
$editForm = $this->createEditForm($entity);
$editForm->handleRequest($request);
@@ -175,7 +126,6 @@ class RoleController extends AbstractController
return $this->render('@ChillEvent/Role/edit.html.twig', [
'entity' => $entity,
'edit_form' => $editForm->createView(),
- 'delete_form' => $deleteForm->createView(),
]);
}
@@ -198,20 +148,6 @@ class RoleController extends AbstractController
return $form;
}
- /**
- * Creates a form to delete a Role entity by id.
- *
- * @return \Symfony\Component\Form\FormInterface The form
- */
- private function createDeleteForm(mixed $id)
- {
- return $this->createFormBuilder()
- ->setAction($this->generateUrl('chill_event_admin_role_delete', ['id' => $id]))
- ->setMethod('DELETE')
- ->add('submit', SubmitType::class, ['label' => 'Delete'])
- ->getForm();
- }
-
/**
* Creates a form to edit a Role entity.
*
diff --git a/src/Bundle/ChillEventBundle/Controller/StatusController.php b/src/Bundle/ChillEventBundle/Controller/StatusController.php
index f83fa9480..1001fe269 100644
--- a/src/Bundle/ChillEventBundle/Controller/StatusController.php
+++ b/src/Bundle/ChillEventBundle/Controller/StatusController.php
@@ -48,30 +48,6 @@ class StatusController extends AbstractController
]);
}
- /**
- * Deletes a Status entity.
- */
- #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/status/{id}/delete', name: 'chill_event_admin_status_delete', methods: ['POST', 'DELETE'])]
- public function deleteAction(Request $request, mixed $id)
- {
- $form = $this->createDeleteForm($id);
- $form->handleRequest($request);
-
- if ($form->isSubmitted() && $form->isValid()) {
- $em = $this->managerRegistry->getManager();
- $entity = $em->getRepository(Status::class)->find($id);
-
- if (!$entity) {
- throw $this->createNotFoundException('Unable to find Status entity.');
- }
-
- $em->remove($entity);
- $em->flush();
- }
-
- return $this->redirectToRoute('chill_event_admin_status');
- }
-
/**
* Displays a form to edit an existing Status entity.
*/
@@ -87,12 +63,10 @@ class StatusController extends AbstractController
}
$editForm = $this->createEditForm($entity);
- $deleteForm = $this->createDeleteForm($id);
return $this->render('@ChillEvent/Status/edit.html.twig', [
'entity' => $entity,
'edit_form' => $editForm->createView(),
- 'delete_form' => $deleteForm->createView(),
]);
}
@@ -126,28 +100,6 @@ class StatusController extends AbstractController
]);
}
- /**
- * Finds and displays a Status entity.
- */
- #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/status/{id}/show', name: 'chill_event_admin_status_show')]
- public function showAction(mixed $id)
- {
- $em = $this->managerRegistry->getManager();
-
- $entity = $em->getRepository(Status::class)->find($id);
-
- if (!$entity) {
- throw $this->createNotFoundException('Unable to find Status entity.');
- }
-
- $deleteForm = $this->createDeleteForm($id);
-
- return $this->render('@ChillEvent/Status/show.html.twig', [
- 'entity' => $entity,
- 'delete_form' => $deleteForm->createView(),
- ]);
- }
-
/**
* Edits an existing Status entity.
*/
@@ -162,7 +114,6 @@ class StatusController extends AbstractController
throw $this->createNotFoundException('Unable to find Status entity.');
}
- $deleteForm = $this->createDeleteForm($id);
$editForm = $this->createEditForm($entity);
$editForm->handleRequest($request);
@@ -175,7 +126,6 @@ class StatusController extends AbstractController
return $this->render('@ChillEvent/Status/edit.html.twig', [
'entity' => $entity,
'edit_form' => $editForm->createView(),
- 'delete_form' => $deleteForm->createView(),
]);
}
@@ -198,19 +148,6 @@ class StatusController extends AbstractController
return $form;
}
- /**
- * Creates a form to delete a Status entity by id.
- *
- * @return \Symfony\Component\Form\FormInterface The form
- */
- private function createDeleteForm(mixed $id)
- {
- return $this->createFormBuilder()
- ->setAction($this->generateUrl('chill_event_admin_status_delete', ['id' => $id]))
- ->add('submit', SubmitType::class, ['label' => 'Delete'])
- ->getForm();
- }
-
/**
* Creates a form to edit a Status entity.
*
diff --git a/src/Bundle/ChillEventBundle/Resources/views/EventType/edit.html.twig b/src/Bundle/ChillEventBundle/Resources/views/EventType/edit.html.twig
index 151a9ec0c..28a5b22e8 100644
--- a/src/Bundle/ChillEventBundle/Resources/views/EventType/edit.html.twig
+++ b/src/Bundle/ChillEventBundle/Resources/views/EventType/edit.html.twig
@@ -8,7 +8,7 @@
{{ form_row(edit_form.name) }}
{{ form_row(edit_form.active) }}
- |