mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
Configure routes using annotation
This commit is contained in:
@@ -91,6 +91,7 @@ class EventController extends AbstractController
|
||||
|
||||
/**
|
||||
* @param $event_id
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/{event_id}/delete", name="chill_event__event_delete", requirements={"event_id"="\d+"}, methods={"GET", "DELETE"})
|
||||
*/
|
||||
public function deleteAction($event_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
@@ -144,6 +145,7 @@ class EventController extends AbstractController
|
||||
* @param $event_id
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/{event_id}/edit", name="chill_event__event_edit")
|
||||
*/
|
||||
public function editAction($event_id)
|
||||
{
|
||||
@@ -171,6 +173,7 @@ class EventController extends AbstractController
|
||||
* @throws \Doctrine\ORM\NonUniqueResultException
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/{person_id}/list", name="chill_event__list_by_person", methods={"GET"})
|
||||
*/
|
||||
public function listByPersonAction($person_id)
|
||||
{
|
||||
@@ -217,6 +220,9 @@ class EventController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/most_recent", name="chill_event_list_most_recent", options={null})
|
||||
*/
|
||||
public function mostRecentIndexAction()
|
||||
{
|
||||
return $this->redirectToRoute('chill_main_search', [
|
||||
@@ -230,6 +236,7 @@ class EventController extends AbstractController
|
||||
* @param Center $center
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/new", name="chill_event__event_new", methods={"GET", "POST"})
|
||||
*/
|
||||
public function newAction(?Center $center, Request $request)
|
||||
{
|
||||
@@ -263,6 +270,7 @@ class EventController extends AbstractController
|
||||
|
||||
/**
|
||||
* First step of new Event form.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/new/pick-center", name="chill_event__event_new_pickcenter", options={null})
|
||||
*/
|
||||
public function newPickCenterAction()
|
||||
{
|
||||
@@ -311,6 +319,7 @@ class EventController extends AbstractController
|
||||
* @throws \PhpOffice\PhpSpreadsheet\Exception
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/{event_id}/show", name="chill_event__event_show")
|
||||
*/
|
||||
public function showAction(Event $event, Request $request)
|
||||
{
|
||||
@@ -343,6 +352,7 @@ class EventController extends AbstractController
|
||||
* Edits an existing Event entity.
|
||||
*
|
||||
* @param $event_id
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/{event_id}/update", name="chill_event__event_update", methods={"POST", "PUT"})
|
||||
*/
|
||||
public function updateAction(Request $request, $event_id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
|
@@ -24,6 +24,7 @@ class EventTypeController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* Creates a new EventType entity.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/event_type/create", name="chill_eventtype_admin_create", methods={"POST"})
|
||||
*/
|
||||
public function createAction(Request $request)
|
||||
{
|
||||
@@ -47,6 +48,7 @@ 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)
|
||||
{
|
||||
@@ -70,6 +72,7 @@ class EventTypeController extends AbstractController
|
||||
|
||||
/**
|
||||
* Displays a form to edit an existing EventType entity.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/event_type/{id}/edit", name="chill_eventtype_admin_edit")
|
||||
*/
|
||||
public function editAction(mixed $id)
|
||||
{
|
||||
@@ -93,6 +96,7 @@ class EventTypeController extends AbstractController
|
||||
|
||||
/**
|
||||
* Lists all EventType entities.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/event_type/", name="chill_eventtype_admin", options={null})
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
@@ -107,6 +111,7 @@ class EventTypeController extends AbstractController
|
||||
|
||||
/**
|
||||
* Displays a form to create a new EventType entity.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/event_type/new", name="chill_eventtype_admin_new")
|
||||
*/
|
||||
public function newAction()
|
||||
{
|
||||
@@ -121,6 +126,7 @@ 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)
|
||||
{
|
||||
@@ -142,6 +148,7 @@ class EventTypeController extends AbstractController
|
||||
|
||||
/**
|
||||
* Edits an existing EventType entity.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/event_type/{id}/update", name="chill_eventtype_admin_update", methods={"POST", "PUT"})
|
||||
*/
|
||||
public function updateAction(Request $request, mixed $id)
|
||||
{
|
||||
|
@@ -44,6 +44,7 @@ class ParticipationController extends AbstractController
|
||||
|
||||
/**
|
||||
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/create", name="chill_event_participation_create")
|
||||
*/
|
||||
public function createAction(Request $request): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
@@ -248,6 +249,7 @@ class ParticipationController extends AbstractController
|
||||
* @param int $participation_id
|
||||
*
|
||||
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/{participation_id}/delete", name="chill_event_participation_delete", requirements={"participation_id"="\d+"}, methods={"GET", "DELETE"})
|
||||
*/
|
||||
public function deleteAction($participation_id, Request $request): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
@@ -295,6 +297,7 @@ class ParticipationController extends AbstractController
|
||||
*
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException if the participation is not found
|
||||
* @throws \Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException if the user is not allowed to edit the participation
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/{participation_id}/edit", name="chill_event_participation_edit")
|
||||
*/
|
||||
public function editAction(int $participation_id): Response
|
||||
{
|
||||
@@ -327,6 +330,7 @@ class ParticipationController extends AbstractController
|
||||
* @param int $event_id
|
||||
*
|
||||
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/{event_id}/edit_multiple", name="chill_event_participation_edit_multiple")
|
||||
*/
|
||||
public function editMultipleAction($event_id): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
@@ -384,6 +388,7 @@ class ParticipationController extends AbstractController
|
||||
* on this, the appropriate layout and form.
|
||||
*
|
||||
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/new", name="chill_event_participation_new")
|
||||
*/
|
||||
public function newAction(Request $request): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
@@ -417,6 +422,9 @@ class ParticipationController extends AbstractController
|
||||
. "'persons_ids' argument in query");
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/{participation_id}/update", name="chill_event_participation_update", methods={"POST"})
|
||||
*/
|
||||
public function updateAction(int $participation_id, Request $request): Response
|
||||
{
|
||||
/** @var Participation $participation */
|
||||
@@ -458,6 +466,9 @@ class ParticipationController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/{event_id}/update_multiple", name="chill_event_participation_update_multiple", methods={"POST"})
|
||||
*/
|
||||
public function updateMultipleAction($event_id, Request $request)
|
||||
{
|
||||
/** @var \Chill\EventBundle\Entity\Event $event */
|
||||
|
@@ -24,6 +24,7 @@ class RoleController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* Creates a new Role entity.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/role/create", name="chill_event_admin_role_create", methods={"POST"})
|
||||
*/
|
||||
public function createAction(Request $request)
|
||||
{
|
||||
@@ -47,6 +48,7 @@ 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)
|
||||
{
|
||||
@@ -70,6 +72,7 @@ class RoleController extends AbstractController
|
||||
|
||||
/**
|
||||
* Displays a form to edit an existing Role entity.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/role/{id}/edit", name="chill_event_admin_role_edit")
|
||||
*/
|
||||
public function editAction(mixed $id)
|
||||
{
|
||||
@@ -93,6 +96,7 @@ class RoleController extends AbstractController
|
||||
|
||||
/**
|
||||
* Lists all Role entities.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/role/", name="chill_event_admin_role", options={null})
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
@@ -107,6 +111,7 @@ class RoleController extends AbstractController
|
||||
|
||||
/**
|
||||
* Displays a form to create a new Role entity.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/role/new", name="chill_event_admin_role_new")
|
||||
*/
|
||||
public function newAction()
|
||||
{
|
||||
@@ -121,6 +126,7 @@ 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)
|
||||
{
|
||||
@@ -142,6 +148,7 @@ class RoleController extends AbstractController
|
||||
|
||||
/**
|
||||
* Edits an existing Role entity.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/role/{id}/update", name="chill_event_admin_role_update", methods={"POST", "PUT"})
|
||||
*/
|
||||
public function updateAction(Request $request, mixed $id)
|
||||
{
|
||||
|
@@ -24,6 +24,7 @@ class StatusController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* Creates a new Status entity.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/status/create", name="chill_event_admin_status_create", methods={"POST"})
|
||||
*/
|
||||
public function createAction(Request $request)
|
||||
{
|
||||
@@ -47,6 +48,7 @@ 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)
|
||||
{
|
||||
@@ -70,6 +72,7 @@ class StatusController extends AbstractController
|
||||
|
||||
/**
|
||||
* Displays a form to edit an existing Status entity.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/status/{id}/edit", name="chill_event_admin_status_edit")
|
||||
*/
|
||||
public function editAction(mixed $id)
|
||||
{
|
||||
@@ -93,6 +96,7 @@ class StatusController extends AbstractController
|
||||
|
||||
/**
|
||||
* Lists all Status entities.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/status/", name="chill_event_admin_status", options={null})
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
@@ -107,6 +111,7 @@ class StatusController extends AbstractController
|
||||
|
||||
/**
|
||||
* Displays a form to create a new Status entity.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/status/new", name="chill_event_admin_status_new")
|
||||
*/
|
||||
public function newAction()
|
||||
{
|
||||
@@ -121,6 +126,7 @@ 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)
|
||||
{
|
||||
@@ -142,6 +148,7 @@ class StatusController extends AbstractController
|
||||
|
||||
/**
|
||||
* Edits an existing Status entity.
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/status/{id}/update", name="chill_event_admin_status_update", methods={"POST", "PUT"})
|
||||
*/
|
||||
public function updateAction(Request $request, mixed $id)
|
||||
{
|
||||
|
Reference in New Issue
Block a user