Configure routes using annotation

This commit is contained in:
Julien Fastré 2023-08-02 16:26:25 +02:00
parent 4b20db7a9c
commit 009a0326d9
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
55 changed files with 215 additions and 772 deletions

View File

@ -28,6 +28,8 @@ return static function (RectorConfig $rectorConfig): void {
\Rector\Symfony\Set\SymfonyLevelSetList::UP_TO_SYMFONY_44, \Rector\Symfony\Set\SymfonyLevelSetList::UP_TO_SYMFONY_44,
]); ]);
$rectorConfig->rule(\Rector\Symfony\Configs\Rector\ClassMethod\AddRouteAnnotationRector::class);
// chill rules // chill rules
//$rectorConfig->rule(\Chill\Utils\Rector\Rector\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector::class); //$rectorConfig->rule(\Chill\Utils\Rector\Rector\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector::class);

View File

@ -24,6 +24,7 @@ class ActivityReasonCategoryController extends AbstractController
{ {
/** /**
* Creates a new ActivityReasonCategory entity. * Creates a new ActivityReasonCategory entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreasoncategory/create", name="chill_activity_activityreasoncategory_create", methods={"POST"})
*/ */
public function createAction(Request $request) public function createAction(Request $request)
{ {
@ -47,6 +48,7 @@ class ActivityReasonCategoryController extends AbstractController
/** /**
* Displays a form to edit an existing ActivityReasonCategory entity. * Displays a form to edit an existing ActivityReasonCategory entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreasoncategory/{id}/edit", name="chill_activity_activityreasoncategory_edit")
*/ */
public function editAction(mixed $id) public function editAction(mixed $id)
{ {
@ -68,6 +70,7 @@ class ActivityReasonCategoryController extends AbstractController
/** /**
* Lists all ActivityReasonCategory entities. * Lists all ActivityReasonCategory entities.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreasoncategory/", name="chill_activity_activityreasoncategory")
*/ */
public function indexAction() public function indexAction()
{ {
@ -82,6 +85,7 @@ class ActivityReasonCategoryController extends AbstractController
/** /**
* Displays a form to create a new ActivityReasonCategory entity. * Displays a form to create a new ActivityReasonCategory entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreasoncategory/new", name="chill_activity_activityreasoncategory_new")
*/ */
public function newAction() public function newAction()
{ {
@ -96,6 +100,7 @@ class ActivityReasonCategoryController extends AbstractController
/** /**
* Finds and displays a ActivityReasonCategory entity. * Finds and displays a ActivityReasonCategory entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreasoncategory/{id}/show", name="chill_activity_activityreasoncategory_show")
*/ */
public function showAction(mixed $id) public function showAction(mixed $id)
{ {
@ -114,6 +119,7 @@ class ActivityReasonCategoryController extends AbstractController
/** /**
* Edits an existing ActivityReasonCategory entity. * Edits an existing ActivityReasonCategory entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreasoncategory/{id}/update", name="chill_activity_activityreasoncategory_update", methods={"POST", "PUT"})
*/ */
public function updateAction(Request $request, mixed $id) public function updateAction(Request $request, mixed $id)
{ {

View File

@ -30,6 +30,7 @@ class ActivityReasonController extends AbstractController
/** /**
* Creates a new ActivityReason entity. * Creates a new ActivityReason entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreason/create", name="chill_activity_activityreason_create", methods={"POST"})
*/ */
public function createAction(Request $request) public function createAction(Request $request)
{ {
@ -53,6 +54,7 @@ class ActivityReasonController extends AbstractController
/** /**
* Displays a form to edit an existing ActivityReason entity. * Displays a form to edit an existing ActivityReason entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreason/{id}/edit", name="chill_activity_activityreason_edit")
*/ */
public function editAction(mixed $id) public function editAction(mixed $id)
{ {
@ -74,6 +76,7 @@ class ActivityReasonController extends AbstractController
/** /**
* Lists all ActivityReason entities. * Lists all ActivityReason entities.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreason/", name="chill_activity_activityreason")
*/ */
public function indexAction() public function indexAction()
{ {
@ -88,6 +91,7 @@ class ActivityReasonController extends AbstractController
/** /**
* Displays a form to create a new ActivityReason entity. * Displays a form to create a new ActivityReason entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreason/new", name="chill_activity_activityreason_new")
*/ */
public function newAction() public function newAction()
{ {
@ -102,6 +106,7 @@ class ActivityReasonController extends AbstractController
/** /**
* Finds and displays a ActivityReason entity. * Finds and displays a ActivityReason entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreason/{id}/show", name="chill_activity_activityreason_show")
*/ */
public function showAction(mixed $id) public function showAction(mixed $id)
{ {
@ -120,6 +125,7 @@ class ActivityReasonController extends AbstractController
/** /**
* Edits an existing ActivityReason entity. * Edits an existing ActivityReason entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activityreason/{id}/update", name="chill_activity_activityreason_update", methods={"POST", "PUT"})
*/ */
public function updateAction(Request $request, mixed $id) public function updateAction(Request $request, mixed $id)
{ {

View File

@ -18,11 +18,18 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
*/ */
class AdminController extends AbstractController class AdminController extends AbstractController
{ {
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activity", name="chill_activity_admin_index")
*/
public function indexActivityAction() public function indexActivityAction()
{ {
return $this->render('@ChillActivity/Admin/layout_activity.html.twig'); return $this->render('@ChillActivity/Admin/layout_activity.html.twig');
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activity_redirect_to_main", name="chill_admin_aside_activity_redirect_to_admin_index", options={null})
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/activity_redirect_to_main", name="chill_admin_activity_redirect_to_admin_index")
*/
public function redirectToAdminIndexAction() public function redirectToAdminIndexAction()
{ {
return $this->redirectToRoute('chill_main_admin_central'); return $this->redirectToRoute('chill_main_admin_central');

View File

@ -1,22 +1,6 @@
chill_activity_activity: chill_activity_routes:
resource: "@ChillActivityBundle/config/routes/activity.yaml" resource: '@ChillActivityBundle/Controller'
prefix: / type: annotation
chill_activity_activityreason:
resource: "@ChillActivityBundle/config/routes/activityreason.yaml"
prefix: /
chill_activity_activityreasoncategory:
resource: "@ChillActivityBundle/config/routes/activityreasoncategory.yaml"
prefix: /
chill_activity_admin_index:
path: /{_locale}/admin/activity
controller: Chill\ActivityBundle\Controller\AdminController::indexActivityAction
chill_admin_activity_redirect_to_admin_index:
path: /{_locale}/admin/activity_redirect_to_main
controller: Chill\ActivityBundle\Controller\AdminController::redirectToAdminIndexAction
chill_activity_type_admin: chill_activity_type_admin:
path: /{_locale}/admin/activity/type path: /{_locale}/admin/activity/type

View File

@ -1,26 +0,0 @@
chill_activity_activity_list:
path: /{_locale}/activity/
controller: Chill\ActivityBundle\Controller\ActivityController::listAction
chill_activity_activity_show:
path: /{_locale}/activity/{id}/show
controller: Chill\ActivityBundle\Controller\ActivityController::showAction
chill_activity_activity_select_type:
path: /{_locale}/activity/select-type
controller: Chill\ActivityBundle\Controller\ActivityController::selectTypeAction
chill_activity_activity_new:
path: /{_locale}/activity/new
controller: Chill\ActivityBundle\Controller\ActivityController::newAction
methods: [POST, GET]
chill_activity_activity_edit:
path: /{_locale}/activity/{id}/edit
controller: Chill\ActivityBundle\Controller\ActivityController::editAction
methods: [GET, POST, PUT]
chill_activity_activity_delete:
path: /{_locale}/activity/{id}/delete
controller: Chill\ActivityBundle\Controller\ActivityController::deleteAction
methods: [GET, POST, DELETE]

View File

@ -1,30 +0,0 @@
chill_activity_activityreason:
path: /{_locale}/admin/activityreason/
controller: Chill\ActivityBundle\Controller\ActivityReasonController::indexAction
chill_activity_activityreason_show:
path: /{_locale}/admin/activityreason/{id}/show
controller: Chill\ActivityBundle\Controller\ActivityReasonController::showAction
chill_activity_activityreason_new:
path: /{_locale}/admin/activityreason/new
controller: Chill\ActivityBundle\Controller\ActivityReasonController::newAction
chill_activity_activityreason_create:
path: /{_locale}/admin/activityreason/create
controller: Chill\ActivityBundle\Controller\ActivityReasonController::createAction
methods: POST
chill_activity_activityreason_edit:
path: /{_locale}/admin/activityreason/{id}/edit
controller: Chill\ActivityBundle\Controller\ActivityReasonController::editAction
chill_activity_activityreason_update:
path: /{_locale}/admin/activityreason/{id}/update
controller: Chill\ActivityBundle\Controller\ActivityReasonController::updateAction
methods: [POST, PUT]
chill_activity_activityreason_delete:
path: /{_locale}/admin/activityreason/{id}/delete
controller: Chill\ActivityBundle\Controller\ActivityReasonController::deleteAction
methods: [POST, DELETE]

View File

@ -1,30 +0,0 @@
chill_activity_activityreasoncategory:
path: /{_locale}/admin/activityreasoncategory/
controller: Chill\ActivityBundle\Controller\ActivityReasonCategoryController::indexAction
chill_activity_activityreasoncategory_show:
path: /{_locale}/admin/activityreasoncategory/{id}/show
controller: Chill\ActivityBundle\Controller\ActivityReasonCategoryController::showAction
chill_activity_activityreasoncategory_new:
path: /{_locale}/admin/activityreasoncategory/new
controller: Chill\ActivityBundle\Controller\ActivityReasonCategoryController::newAction
chill_activity_activityreasoncategory_create:
path: /{_locale}/admin/activityreasoncategory/create
controller: Chill\ActivityBundle\Controller\ActivityReasonCategoryController::createAction
methods: POST
chill_activity_activityreasoncategory_edit:
path: /{_locale}/admin/activityreasoncategory/{id}/edit
controller: Chill\ActivityBundle\Controller\ActivityReasonCategoryController::editAction
chill_activity_activityreasoncategory_update:
path: /{_locale}/admin/activityreasoncategory/{id}/update
controller: Chill\ActivityBundle\Controller\ActivityReasonCategoryController::updateAction
methods: [POST, PUT]
chill_activity_activityreasoncategory_delete:
path: /{_locale}/admin/activityreasoncategory/{id}/delete
controller: Chill\ActivityBundle\Controller\ActivityReasonCategoryController::deleteAction
methods: [POST, DELETE]

View File

@ -1,12 +1,3 @@
chill_asideactivities_controllers: chill_asideactivities_controllers:
resource: "@ChillAsideActivityBundle/Controller" resource: "@ChillAsideActivityBundle/Controller"
type: annotation type: annotation
chill_admin_aside_activity_redirect_to_admin_index:
path: /{_locale}/admin/activity_redirect_to_main
controller: Chill\ActivityBundle\Controller\AdminController::redirectToAdminIndexAction
options:
menus:
admin_aside_activity:
order: 0
label: Main admin menu

View File

@ -12,6 +12,8 @@ declare(strict_types=1);
namespace Chill\CustomFieldsBundle\Controller; namespace Chill\CustomFieldsBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/** /**
* Class AdminController * Class AdminController
@ -19,7 +21,10 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
*/ */
class AdminController extends AbstractController class AdminController extends AbstractController
{ {
public function indexAction() /**
* @Route("/{_locale}/admin/customfield/", name="customfield_section")
*/
public function indexAction(): Response
{ {
return $this->render('ChillCustomFieldsBundle:Admin:layout.html.twig'); return $this->render('ChillCustomFieldsBundle:Admin:layout.html.twig');
} }

View File

@ -17,6 +17,7 @@ use Chill\CustomFieldsBundle\Form\CustomFieldType;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
/** /**
* Class CustomFieldController. * Class CustomFieldController.
@ -25,6 +26,7 @@ class CustomFieldController extends AbstractController
{ {
/** /**
* Creates a new CustomField entity. * Creates a new CustomField entity.
* @Route("/{_locale}/admin/customfield/new", name="customfield_new")
*/ */
public function createAction(Request $request) public function createAction(Request $request)
{ {
@ -54,6 +56,8 @@ class CustomFieldController extends AbstractController
/** /**
* Displays a form to edit an existing CustomField entity. * Displays a form to edit an existing CustomField entity.
*
* @Route("/{_locale}/admin/customfield/edit", name="customfield_edit")
*/ */
public function editAction(mixed $id) public function editAction(mixed $id)
{ {
@ -75,6 +79,8 @@ class CustomFieldController extends AbstractController
/** /**
* Displays a form to create a new CustomField entity. * Displays a form to create a new CustomField entity.
*
* @Route("/{_locale}/admin/customfield/new", name="customfield_new")
*/ */
public function newAction(Request $request) public function newAction(Request $request)
{ {
@ -103,27 +109,9 @@ class CustomFieldController extends AbstractController
]); ]);
} }
/**
* Finds and displays a CustomField entity.
*
* @deprecated is not used since there is no link to show action
*/
public function showAction(mixed $id)
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository(CustomField::class)->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find CustomField entity.');
}
return $this->render('ChillCustomFieldsBundle:CustomField:show.html.twig', [
'entity' => $entity, ]);
}
/** /**
* Edits an existing CustomField entity. * Edits an existing CustomField entity.
* @Route("/{_locale}/admin/customfield/update", name="customfield_update")
*/ */
public function updateAction(Request $request, mixed $id) public function updateAction(Request $request, mixed $id)
{ {

View File

@ -25,6 +25,7 @@ use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType; use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Contracts\Translation\TranslatorInterface;
use function in_array; use function in_array;
@ -42,6 +43,7 @@ class CustomFieldsGroupController extends AbstractController
/** /**
* Creates a new CustomFieldsGroup entity. * Creates a new CustomFieldsGroup entity.
* @Route("/{_locale}/admin/customfieldsgroup/create", name="customfieldsgroup_create")
*/ */
public function createAction(Request $request) public function createAction(Request $request)
{ {
@ -71,6 +73,7 @@ class CustomFieldsGroupController extends AbstractController
/** /**
* Displays a form to edit an existing CustomFieldsGroup entity. * Displays a form to edit an existing CustomFieldsGroup entity.
* @Route("/{_locale}/admin/customfieldsgroup/{id}/edit", name="customfieldsgroup_edit")
*/ */
public function editAction(mixed $id) public function editAction(mixed $id)
{ {
@ -92,6 +95,8 @@ class CustomFieldsGroupController extends AbstractController
/** /**
* Lists all CustomFieldsGroup entities. * Lists all CustomFieldsGroup entities.
*
* @Route("/{_locale}/admin/customfieldsgroup/", name="customfieldsgroup")
*/ */
public function indexAction() public function indexAction()
{ {
@ -117,6 +122,7 @@ class CustomFieldsGroupController extends AbstractController
/** /**
* Set the CustomField Group with id $cFGroupId as default. * Set the CustomField Group with id $cFGroupId as default.
* @Route("/{_locale}/admin/customfieldsgroup/makedefault", name="customfieldsgroup_makedefault")
*/ */
public function makeDefaultAction(Request $request) public function makeDefaultAction(Request $request)
{ {
@ -162,6 +168,8 @@ class CustomFieldsGroupController extends AbstractController
/** /**
* Displays a form to create a new CustomFieldsGroup entity. * Displays a form to create a new CustomFieldsGroup entity.
*
* @Route("/{_locale}/admin/customfieldsgroup/new", name="customfieldsgroup_new")
*/ */
public function newAction() public function newAction()
{ {
@ -225,6 +233,9 @@ class CustomFieldsGroupController extends AbstractController
/** /**
* Finds and displays a CustomFieldsGroup entity. * Finds and displays a CustomFieldsGroup entity.
*
* @Route("/{_locale}/admin/customfieldsgroup/{id}/show", name="customfieldsgroup/show")
*
*/ */
public function showAction(mixed $id) public function showAction(mixed $id)
{ {
@ -247,6 +258,8 @@ class CustomFieldsGroupController extends AbstractController
/** /**
* Edits an existing CustomFieldsGroup entity. * Edits an existing CustomFieldsGroup entity.
*
* @Route("/{_locale}/admin/customfieldsgroup/{id}/update", name="customfieldsgroup/update")
*/ */
public function updateAction(Request $request, mixed $id) public function updateAction(Request $request, mixed $id)
{ {

View File

@ -1,7 +1,3 @@
chill_customfields_customfieldsgroup: chill_customfields_controller:
resource: "@ChillCustomFieldsBundle/config/routes/customfieldsgroup.yaml" resource: "./../Controller"
prefix: / type: annotation
chill_customfields_customfield:
resource: "@ChillCustomFieldsBundle/config/routes/customfield.yaml"
prefix: /

View File

@ -1,21 +0,0 @@
customfield_section:
path: /{_locale}/admin/customfield/
defaults: { _controller: "ChillCustomFieldsBundle:Admin:index" }
customfield_new:
path: /{_locale}/admin/customfield/new
defaults: { _controller: "ChillCustomFieldsBundle:CustomField:new" }
customfield_create:
path: /{_locale}/admin/customfield/create
defaults: { _controller: "ChillCustomFieldsBundle:CustomField:create" }
methods: [POST]
customfield_edit:
path: /{_locale}/admin/customfield/{id}/edit
defaults: { _controller: "ChillCustomFieldsBundle:CustomField:edit" }
customfield_update:
path: /{_locale}/admin/customfield/{id}/update
defaults: { _controller: "ChillCustomFieldsBundle:CustomField:update" }
methods: [POST, PUT]

View File

@ -1,34 +0,0 @@
customfieldsgroup:
path: /{_locale}/admin/customfieldsgroup/
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:index" }
customfieldsgroup_show:
path: /{_locale}/admin/customfieldsgroup/{id}/show
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:show" }
customfieldsgroup_makedefault:
path: /{_locale}/admin/customfieldsgroup/make_default
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:makeDefault" }
customfieldsgroup_new:
path: /{_locale}/admin/customfieldsgroup/new
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:new" }
customfieldsgroup_create:
path: /{_locale}/admin/customfieldsgroup/create
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:create" }
methods: POST
customfieldsgroup_edit:
path: /{_locale}/admin/customfieldsgroup/{id}/edit
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:edit" }
customfieldsgroup_update:
path: /{_locale}/admin/customfieldsgroup/{id}/update
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:update" }
methods: [POST, PUT]
customfieldsgroup_delete:
path: /{_locale}/admin/customfieldsgroup/{id}/delete
defaults: { _controller: "ChillCustomFieldsBundle:CustomFieldsGroup:delete" }
methods: [POST, DELETE]

View File

@ -20,6 +20,7 @@ class AdminController extends AbstractController
{ {
/** /**
* @return \Symfony\Component\HttpFoundation\Response * @return \Symfony\Component\HttpFoundation\Response
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/document", name="chill_docstore_admin", options={null})
*/ */
public function indexAction() public function indexAction()
{ {
@ -28,6 +29,7 @@ class AdminController extends AbstractController
/** /**
* @return \Symfony\Component\HttpFoundation\RedirectResponse * @return \Symfony\Component\HttpFoundation\RedirectResponse
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/document_redirect_to_main", name="chill_docstore_admin_redirect_to_admin_index", options={null})
*/ */
public function redirectToAdminIndexAction() public function redirectToAdminIndexAction()
{ {

View File

@ -76,7 +76,7 @@ class DocumentCategoryController extends AbstractController
/** /**
* @Route("/", name="document_category_index", methods="GET") * @Route("/", name="document_category_index", methods="GET")
*/ * @Route("/", name="chill_docstore_category_admin", methods="GET") */
public function index(): Response public function index(): Response
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();

View File

@ -1,27 +1,3 @@
app: app:
resource: "@ChillDocStoreBundle/Controller/" resource: "@ChillDocStoreBundle/Controller/"
type: annotation type: annotation
## ADMIN SECTION
chill_docstore_admin:
path: /{_locale}/admin/document
controller: Chill\DocStoreBundle\Controller\AdminController::indexAction
options:
menus:
admin_section:
order: 2200
label: "Documents configuration menu"
icons: ['calendar']
chill_docstore_admin_redirect_to_admin_index:
path: /{_locale}/admin/document_redirect_to_main
controller: Chill\DocStoreBundle\Controller\AdminController::redirectToAdminIndexAction
options:
menus:
admin_docstore:
order: 0
label: Main admin menu
chill_docstore_category_admin:
path: /{_locale}/admin/document/category
controller: Chill\DocStoreBundle\Controller\DocumentCategoryController::indexAction

View File

@ -91,6 +91,7 @@ class EventController extends AbstractController
/** /**
* @param $event_id * @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 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 * @param $event_id
* *
* @return \Symfony\Component\HttpFoundation\Response * @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) public function editAction($event_id)
{ {
@ -171,6 +173,7 @@ class EventController extends AbstractController
* @throws \Doctrine\ORM\NonUniqueResultException * @throws \Doctrine\ORM\NonUniqueResultException
* *
* @return \Symfony\Component\HttpFoundation\Response * @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) 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() public function mostRecentIndexAction()
{ {
return $this->redirectToRoute('chill_main_search', [ return $this->redirectToRoute('chill_main_search', [
@ -230,6 +236,7 @@ class EventController extends AbstractController
* @param Center $center * @param Center $center
* *
* @return \Symfony\Component\HttpFoundation\Response * @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) public function newAction(?Center $center, Request $request)
{ {
@ -263,6 +270,7 @@ class EventController extends AbstractController
/** /**
* First step of new Event form. * 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() public function newPickCenterAction()
{ {
@ -311,6 +319,7 @@ class EventController extends AbstractController
* @throws \PhpOffice\PhpSpreadsheet\Exception * @throws \PhpOffice\PhpSpreadsheet\Exception
* *
* @return \Symfony\Component\HttpFoundation\Response * @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) public function showAction(Event $event, Request $request)
{ {
@ -343,6 +352,7 @@ class EventController extends AbstractController
* Edits an existing Event entity. * Edits an existing Event entity.
* *
* @param $event_id * @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 public function updateAction(Request $request, $event_id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{ {

View File

@ -24,6 +24,7 @@ class EventTypeController extends AbstractController
{ {
/** /**
* Creates a new EventType entity. * 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) public function createAction(Request $request)
{ {
@ -47,6 +48,7 @@ class EventTypeController extends AbstractController
/** /**
* Deletes a EventType entity. * 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) public function deleteAction(Request $request, mixed $id)
{ {
@ -70,6 +72,7 @@ class EventTypeController extends AbstractController
/** /**
* Displays a form to edit an existing EventType entity. * 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) public function editAction(mixed $id)
{ {
@ -93,6 +96,7 @@ class EventTypeController extends AbstractController
/** /**
* Lists all EventType entities. * Lists all EventType entities.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/event_type/", name="chill_eventtype_admin", options={null})
*/ */
public function indexAction() public function indexAction()
{ {
@ -107,6 +111,7 @@ class EventTypeController extends AbstractController
/** /**
* Displays a form to create a new EventType entity. * 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() public function newAction()
{ {
@ -121,6 +126,7 @@ class EventTypeController extends AbstractController
/** /**
* Finds and displays a EventType entity. * 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) public function showAction(mixed $id)
{ {
@ -142,6 +148,7 @@ class EventTypeController extends AbstractController
/** /**
* Edits an existing EventType entity. * 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) public function updateAction(Request $request, mixed $id)
{ {

View File

@ -44,6 +44,7 @@ class ParticipationController extends AbstractController
/** /**
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse * @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 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 * @param int $participation_id
* *
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse * @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 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\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 * @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 public function editAction(int $participation_id): Response
{ {
@ -327,6 +330,7 @@ class ParticipationController extends AbstractController
* @param int $event_id * @param int $event_id
* *
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse * @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 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. * on this, the appropriate layout and form.
* *
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse * @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 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"); . "'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 public function updateAction(int $participation_id, Request $request): Response
{ {
/** @var Participation $participation */ /** @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) public function updateMultipleAction($event_id, Request $request)
{ {
/** @var \Chill\EventBundle\Entity\Event $event */ /** @var \Chill\EventBundle\Entity\Event $event */

View File

@ -24,6 +24,7 @@ class RoleController extends AbstractController
{ {
/** /**
* Creates a new Role entity. * 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) public function createAction(Request $request)
{ {
@ -47,6 +48,7 @@ class RoleController extends AbstractController
/** /**
* Deletes a Role entity. * 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) public function deleteAction(Request $request, mixed $id)
{ {
@ -70,6 +72,7 @@ class RoleController extends AbstractController
/** /**
* Displays a form to edit an existing Role entity. * 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) public function editAction(mixed $id)
{ {
@ -93,6 +96,7 @@ class RoleController extends AbstractController
/** /**
* Lists all Role entities. * Lists all Role entities.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/role/", name="chill_event_admin_role", options={null})
*/ */
public function indexAction() public function indexAction()
{ {
@ -107,6 +111,7 @@ class RoleController extends AbstractController
/** /**
* Displays a form to create a new Role entity. * 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() public function newAction()
{ {
@ -121,6 +126,7 @@ class RoleController extends AbstractController
/** /**
* Finds and displays a Role entity. * 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) public function showAction(mixed $id)
{ {
@ -142,6 +148,7 @@ class RoleController extends AbstractController
/** /**
* Edits an existing Role entity. * 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) public function updateAction(Request $request, mixed $id)
{ {

View File

@ -24,6 +24,7 @@ class StatusController extends AbstractController
{ {
/** /**
* Creates a new Status entity. * 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) public function createAction(Request $request)
{ {
@ -47,6 +48,7 @@ class StatusController extends AbstractController
/** /**
* Deletes a Status entity. * 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) public function deleteAction(Request $request, mixed $id)
{ {
@ -70,6 +72,7 @@ class StatusController extends AbstractController
/** /**
* Displays a form to edit an existing Status entity. * 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) public function editAction(mixed $id)
{ {
@ -93,6 +96,7 @@ class StatusController extends AbstractController
/** /**
* Lists all Status entities. * Lists all Status entities.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/event/status/", name="chill_event_admin_status", options={null})
*/ */
public function indexAction() public function indexAction()
{ {
@ -107,6 +111,7 @@ class StatusController extends AbstractController
/** /**
* Displays a form to create a new Status entity. * 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() public function newAction()
{ {
@ -121,6 +126,7 @@ class StatusController extends AbstractController
/** /**
* Finds and displays a Status entity. * 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) public function showAction(mixed $id)
{ {
@ -142,6 +148,7 @@ class StatusController extends AbstractController
/** /**
* Edits an existing Status entity. * 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) public function updateAction(Request $request, mixed $id)
{ {

View File

@ -1,42 +1,3 @@
chill_event_event: chill_event_controllers:
resource: "@ChillEventBundle/config/routes/event.yaml" resource: "@ChillEventBundle/Controller"
prefix: /{_locale}/event/event type: annotation
chill_event_participation:
resource: "@ChillEventBundle/config/routes/participation.yaml"
prefix: /{_locale}/event/participation
## ADMIN
chill_event_admin_index:
path: /{_locale}/admin/event
controller: Chill\EventBundle\Controller\AdminController::indexAdminAction
# options:
# menus:
# admin_section:
# order: 2100
# label: "Events"
# icons: ['calendar']
# chill_event_admin_redirect_to_admin_index:
# path: /{_locale}/admin/event_redirect_to_main
# controller: Chill\EventBundle\Controller\AdminController::redirectToAdminIndexAction
# options:
# menus:
# admin_events:
# order: 0
# label: Main admin menu
chill_event_admin_status:
resource: "@ChillEventBundle/config/routes/status.yaml"
prefix: /{_locale}/admin/event/status
chill_event_admin_role:
resource: "@ChillEventBundle/config/routes/role.yaml"
prefix: /{_locale}/admin/event/role
chill_event_admin_event_type:
resource: "@ChillEventBundle/config/routes/eventtype.yaml"
prefix: /{_locale}/admin/event/event_type

View File

@ -1,49 +0,0 @@
chill_event_list_most_recent:
path: most_recent
controller: Chill\EventBundle\Controller\EventController::mostRecentIndexAction
options:
menus:
section:
order: 90
label: Events
icons: [calendar]
chill_event__event_show:
path: /{event_id}/show
controller: Chill\EventBundle\Controller\EventController::showAction
chill_event__event_new_pickcenter:
path: /new/pick-center
controller: Chill\EventBundle\Controller\EventController::newPickCenterAction
options:
menus:
section:
order: 11
label: Add an event
icons: [plus, calendar-o]
chill_event__event_new:
path: /new
controller: Chill\EventBundle\Controller\EventController::newAction
methods: [ GET, POST ]
chill_event__event_edit:
path: /{event_id}/edit
controller: Chill\EventBundle\Controller\EventController::editAction
chill_event__event_update:
path: /{event_id}/update
controller: Chill\EventBundle\Controller\EventController::updateAction
methods: [POST, PUT]
chill_event__list_by_person:
path: /{person_id}/list
controller: Chill\EventBundle\Controller\EventController::listByPersonAction
methods: [ GET ]
chill_event__event_delete:
path: /{event_id}/delete
requirements:
event_id: \d+
controller: Chill\EventBundle\Controller\EventController::deleteAction
methods: [ GET, DELETE ]

View File

@ -1,35 +0,0 @@
chill_eventtype_admin:
path: /
controller: Chill\EventBundle\Controller\EventTypeController::indexAction
options:
menus:
admin_events:
order: 90
label: "Event types"
chill_eventtype_admin_show:
path: /{id}/show
controller: Chill\EventBundle\Controller\EventTypeController::showAction
chill_eventtype_admin_new:
path: /new
controller: Chill\EventBundle\Controller\EventTypeController::newAction
chill_eventtype_admin_create:
path: /create
controller: Chill\EventBundle\Controller\EventTypeController::createAction
methods: POST
chill_eventtype_admin_edit:
path: /{id}/edit
controller: Chill\EventBundle\Controller\EventTypeController::editAction
chill_eventtype_admin_update:
path: /{id}/update
controller: Chill\EventBundle\Controller\EventTypeController::updateAction
methods: [POST, PUT]
chill_eventtype_admin_delete:
path: /{id}/delete
controller: Chill\EventBundle\Controller\EventTypeController::deleteAction
methods: [POST, DELETE]

View File

@ -1,33 +0,0 @@
chill_event_participation_new:
path: /new
controller: Chill\EventBundle\Controller\ParticipationController::newAction
chill_event_participation_create:
path: /create
controller: Chill\EventBundle\Controller\ParticipationController::createAction
chill_event_participation_edit:
path: /{participation_id}/edit
controller: Chill\EventBundle\Controller\ParticipationController::editAction
chill_event_participation_update:
path: /{participation_id}/update
controller: Chill\EventBundle\Controller\ParticipationController::updateAction
methods: [POST]
chill_event_participation_edit_multiple:
path: /{event_id}/edit_multiple
controller: Chill\EventBundle\Controller\ParticipationController::editMultipleAction
chill_event_participation_update_multiple:
path: /{event_id}/update_multiple
controller: Chill\EventBundle\Controller\ParticipationController::updateMultipleAction
methods: [POST]
chill_event_participation_delete:
path: /{participation_id}/delete
requirements:
participation_id: \d+
controller: Chill\EventBundle\Controller\ParticipationController::deleteAction
methods: [ GET, DELETE ]

View File

@ -1,35 +0,0 @@
chill_event_admin_role:
path: /
controller: Chill\EventBundle\Controller\RoleController::indexAction
options:
menus:
admin_events:
order: 110
label: "Event roles"
chill_event_admin_role_show:
path: /{id}/show
controller: Chill\EventBundle\Controller\RoleController::showAction
chill_event_admin_role_new:
path: /new
controller: Chill\EventBundle\Controller\RoleController::newAction
chill_event_admin_role_create:
path: /create
controller: Chill\EventBundle\Controller\RoleController::createAction
methods: POST
chill_event_admin_role_edit:
path: /{id}/edit
controller: Chill\EventBundle\Controller\RoleController::editAction
chill_event_admin_role_update:
path: /{id}/update
controller: Chill\EventBundle\Controller\RoleController::updateAction
methods: [POST, PUT]
chill_event_admin_role_delete:
path: /{id}/delete
controller: Chill\EventBundle\Controller\RoleController::deleteAction
methods: [POST, DELETE]

View File

@ -1,35 +0,0 @@
chill_event_admin_status:
path: /
controller: Chill\EventBundle\Controller\StatusController::indexAction
options:
menus:
admin_events:
order: 100
label: "Event status"
chill_event_admin_status_show:
path: /{id}/show
controller: Chill\EventBundle\Controller\StatusController::showAction
chill_event_admin_status_new:
path: /new
controller: Chill\EventBundle\Controller\StatusController::newAction
chill_event_admin_status_create:
path: /create
controller: Chill\EventBundle\Controller\StatusController::createAction
methods: POST
chill_event_admin_status_edit:
path: /{id}/edit
controller: Chill\EventBundle\Controller\StatusController::editAction
chill_event_admin_status_update:
path: /{id}/update
controller: Chill\EventBundle\Controller\StatusController::updateAction
methods: [POST, PUT]
chill_event_admin_status_delete:
path: /{id}/delete
controller: Chill\EventBundle\Controller\StatusController::deleteAction
methods: [POST, DELETE]

View File

@ -24,6 +24,7 @@ class CenterController extends AbstractController
{ {
/** /**
* Creates a new Center entity. * Creates a new Center entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/center/create", name="admin_center_create", methods={"POST"})
*/ */
public function createAction(Request $request) public function createAction(Request $request)
{ {
@ -47,6 +48,7 @@ class CenterController extends AbstractController
/** /**
* Displays a form to edit an existing Center entity. * Displays a form to edit an existing Center entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/center/{id}/edit", name="admin_center_edit")
*/ */
public function editAction(mixed $id) public function editAction(mixed $id)
{ {
@ -68,6 +70,7 @@ class CenterController extends AbstractController
/** /**
* Lists all Center entities. * Lists all Center entities.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/center/", name="admin_center")
*/ */
public function indexAction() public function indexAction()
{ {
@ -82,6 +85,7 @@ class CenterController extends AbstractController
/** /**
* Displays a form to create a new Center entity. * Displays a form to create a new Center entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/center/new", name="admin_center_new")
*/ */
public function newAction() public function newAction()
{ {
@ -114,6 +118,7 @@ class CenterController extends AbstractController
/** /**
* Edits an existing Center entity. * Edits an existing Center entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/center/{id}/update", name="admin_center_update", methods={"POST", "PUT"})
*/ */
public function updateAction(Request $request, mixed $id) public function updateAction(Request $request, mixed $id)
{ {

View File

@ -18,6 +18,9 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
*/ */
class DefaultController extends AbstractController class DefaultController extends AbstractController
{ {
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/homepage", name="chill_main_homepage")
*/
public function indexAction() public function indexAction()
{ {
if ($this->isGranted('ROLE_ADMIN')) { if ($this->isGranted('ROLE_ADMIN')) {
@ -27,6 +30,9 @@ class DefaultController extends AbstractController
return $this->render('@ChillMain/layout.html.twig'); return $this->render('@ChillMain/layout.html.twig');
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/homepage", name="chill_main_homepage_without_locale")
*/
public function indexWithoutLocaleAction() public function indexWithoutLocaleAction()
{ {
return $this->redirectToRoute('chill_main_homepage'); return $this->redirectToRoute('chill_main_homepage');

View File

@ -66,6 +66,9 @@ class ExportController extends AbstractController
) { ) {
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/exports/download/{alias}", name="chill_main_export_download", methods={"GET"})
*/
public function downloadResultAction(Request $request, $alias) public function downloadResultAction(Request $request, $alias)
{ {
/** @var \Chill\MainBundle\Export\ExportManager $exportManager */ /** @var \Chill\MainBundle\Export\ExportManager $exportManager */
@ -107,6 +110,7 @@ class ExportController extends AbstractController
* @param string $alias * @param string $alias
* *
* @return \Symfony\Component\HttpFoundation\Response * @return \Symfony\Component\HttpFoundation\Response
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/exports/generate/{alias}", name="chill_main_export_generate", methods={"GET"})
*/ */
public function generateAction(Request $request, $alias) public function generateAction(Request $request, $alias)
{ {
@ -150,6 +154,7 @@ class ExportController extends AbstractController
/** /**
* Render the list of available exports. * Render the list of available exports.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/exports/", name="chill_main_export_index")
*/ */
public function indexAction(): Response public function indexAction(): Response
{ {
@ -174,6 +179,7 @@ class ExportController extends AbstractController
* 3. 'generate': gather data from session from the previous steps, and * 3. 'generate': gather data from session from the previous steps, and
* make a redirection to the "generate" action with data in query (HTTP GET) * make a redirection to the "generate" action with data in query (HTTP GET)
* *
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/exports/new/{alias}", name="chill_main_export_new")
*/ */
public function newAction(Request $request, string $alias): Response public function newAction(Request $request, string $alias): Response
{ {

View File

@ -35,6 +35,7 @@ class LoginController extends AbstractController
* Show a login form. * Show a login form.
* *
* @return Response * @return Response
* @\Symfony\Component\Routing\Annotation\Route(path="/login", name="login")
*/ */
public function loginAction(Request $request) public function loginAction(Request $request)
{ {

View File

@ -26,6 +26,7 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface; use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
use Symfony\Component\Validator\Constraints\Callback; use Symfony\Component\Validator\Constraints\Callback;
use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface;
@ -87,6 +88,7 @@ class PasswordController extends AbstractController
/** /**
* @return Response * @return Response
* @\Symfony\Component\Routing\Annotation\Route(path="/public/{_locale}/password/request-changed", name="password_request_recover_changed")
*/ */
public function changeConfirmedAction() public function changeConfirmedAction()
{ {
@ -95,6 +97,7 @@ class PasswordController extends AbstractController
/** /**
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse * @return Response|\Symfony\Component\HttpFoundation\RedirectResponse
* @\Symfony\Component\Routing\Annotation\Route(path="/public/{_locale}/password/recover", name="password_recover")
*/ */
public function recoverAction(Request $request): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse public function recoverAction(Request $request): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse
{ {
@ -163,6 +166,7 @@ class PasswordController extends AbstractController
* @throws \Doctrine\ORM\NonUniqueResultException * @throws \Doctrine\ORM\NonUniqueResultException
* *
* @return Response|\Symfony\Component\HttpFoundation\RedirectResponse * @return Response|\Symfony\Component\HttpFoundation\RedirectResponse
* @\Symfony\Component\Routing\Annotation\Route(path="/public/{_locale}/password/request-recover", name="password_request_recover")
*/ */
public function requestRecoverAction(Request $request): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse public function requestRecoverAction(Request $request): \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\RedirectResponse
{ {
@ -234,6 +238,7 @@ class PasswordController extends AbstractController
/** /**
* @return Response * @return Response
* @\Symfony\Component\Routing\Annotation\Route(path="/public/{_locale}/password/request-confirm", name="password_request_recover_confirm")
*/ */
public function requestRecoverConfirmAction() public function requestRecoverConfirmAction()
{ {
@ -242,6 +247,7 @@ class PasswordController extends AbstractController
/** /**
* @return Response * @return Response
* @Route("/{_locale}/my/password", name="change_my_password")
*/ */
public function UserPasswordAction(Request $request) public function UserPasswordAction(Request $request)
{ {

View File

@ -54,6 +54,7 @@ final class PermissionsGroupController extends AbstractController
} }
/** /**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/permissionsgroup/{id}/add_link_role_scope", name="admin_permissionsgroup_add_role_scope", methods={"PUT"})
*/ */
public function addLinkRoleScopeAction(Request $request, int $id): Response public function addLinkRoleScopeAction(Request $request, int $id): Response
{ {
@ -132,6 +133,7 @@ final class PermissionsGroupController extends AbstractController
/** /**
* Creates a new PermissionsGroup entity. * Creates a new PermissionsGroup entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/permissionsgroup/create", name="admin_permissionsgroup_create", methods={"POST"})
*/ */
public function createAction(Request $request): Response public function createAction(Request $request): Response
{ {
@ -154,6 +156,7 @@ final class PermissionsGroupController extends AbstractController
/** /**
* remove an association between permissionsGroup and roleScope. * remove an association between permissionsGroup and roleScope.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/permissionsgroup/{pgid}/delete_link_role_scope/{rsid}", name="admin_permissionsgroup_delete_role_scope", methods={"DELETE"})
*/ */
public function deleteLinkRoleScopeAction(int $pgid, int $rsid): Response public function deleteLinkRoleScopeAction(int $pgid, int $rsid): Response
{ {
@ -210,6 +213,7 @@ final class PermissionsGroupController extends AbstractController
/** /**
* Displays a form to edit an existing PermissionsGroup entity. * Displays a form to edit an existing PermissionsGroup entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/permissionsgroup/{id}/edit", name="admin_permissionsgroup_edit")
*/ */
public function editAction(int $id): Response public function editAction(int $id): Response
{ {
@ -256,6 +260,7 @@ final class PermissionsGroupController extends AbstractController
/** /**
* Lists all PermissionsGroup entities. * Lists all PermissionsGroup entities.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/permissionsgroup/", name="admin_permissionsgroup")
*/ */
public function indexAction(): Response public function indexAction(): Response
{ {
@ -268,6 +273,7 @@ final class PermissionsGroupController extends AbstractController
/** /**
* Displays a form to create a new PermissionsGroup entity. * Displays a form to create a new PermissionsGroup entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/permissionsgroup/new", name="admin_permissionsgroup_new")
*/ */
public function newAction(): Response public function newAction(): Response
{ {
@ -282,6 +288,7 @@ final class PermissionsGroupController extends AbstractController
/** /**
* Finds and displays a PermissionsGroup entity. * Finds and displays a PermissionsGroup entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/permissionsgroup/{id}/show", name="admin_permissionsgroup_show")
*/ */
public function showAction(int $id): Response public function showAction(int $id): Response
{ {
@ -333,6 +340,7 @@ final class PermissionsGroupController extends AbstractController
/** /**
* Edits an existing PermissionsGroup entity. * Edits an existing PermissionsGroup entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/permissionsgroup/{id}/update", name="admin_permissionsgroup_update", methods={"POST", "PUT"})
*/ */
public function updateAction(Request $request, int $id): Response public function updateAction(Request $request, int $id): Response
{ {

View File

@ -24,6 +24,7 @@ class ScopeController extends AbstractController
{ {
/** /**
* Creates a new Scope entity. * Creates a new Scope entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/scope/create", name="admin_scope_create", methods={"POST"})
*/ */
public function createAction(Request $request) public function createAction(Request $request)
{ {
@ -47,6 +48,7 @@ class ScopeController extends AbstractController
/** /**
* Displays a form to edit an existing Scope entity. * Displays a form to edit an existing Scope entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/scope/{id}/edit", name="admin_scope_edit")
*/ */
public function editAction(mixed $id) public function editAction(mixed $id)
{ {
@ -68,6 +70,7 @@ class ScopeController extends AbstractController
/** /**
* Lists all Scope entities. * Lists all Scope entities.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/scope/", name="admin_scope")
*/ */
public function indexAction() public function indexAction()
{ {
@ -82,6 +85,7 @@ class ScopeController extends AbstractController
/** /**
* Displays a form to create a new Scope entity. * Displays a form to create a new Scope entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/scope/new", name="admin_scope_new")
*/ */
public function newAction() public function newAction()
{ {
@ -114,6 +118,7 @@ class ScopeController extends AbstractController
/** /**
* Edits an existing Scope entity. * Edits an existing Scope entity.
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/scope/{id}/update", name="admin_scope_update", methods={"POST", "PUT"})
*/ */
public function updateAction(Request $request, mixed $id) public function updateAction(Request $request, mixed $id)
{ {

View File

@ -40,6 +40,9 @@ class SearchController extends AbstractController
{ {
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/search/advanced/{name}", name="chill_main_advanced_search")
*/
public function advancedSearchAction($name, Request $request) public function advancedSearchAction($name, Request $request)
{ {
try { try {
@ -85,6 +88,9 @@ class SearchController extends AbstractController
); );
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/search/advanced", name="chill_main_advanced_search_list")
*/
public function advancedSearchListAction(Request $request) public function advancedSearchListAction(Request $request)
{ {
/** @var Chill\MainBundle\Search\SearchProvider $variable */ /** @var Chill\MainBundle\Search\SearchProvider $variable */
@ -101,6 +107,9 @@ class SearchController extends AbstractController
return $this->render('@ChillMain/Search/choose_list.html.twig'); return $this->render('@ChillMain/Search/choose_list.html.twig');
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/search.{_format}", name="chill_main_search", requirements={"_format"="html|json"}, defaults={"_format"="html"})
*/
public function searchAction(Request $request, $_format) public function searchAction(Request $request, $_format)
{ {
$pattern = trim((string) $request->query->get('q', '')); $pattern = trim((string) $request->query->get('q', ''));
@ -190,6 +199,9 @@ class SearchController extends AbstractController
); );
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/api/1.0/search.{_format}", name="chill_main_search_global", requirements={"_format"="json"}, defaults={"_format"="json"})
*/
public function searchApi(Request $request, $_format): JsonResponse public function searchApi(Request $request, $_format): JsonResponse
{ {
//TODO this is an incomplete implementation //TODO this is an incomplete implementation

View File

@ -2,38 +2,6 @@ chill_main_controllers:
resource: '../Controller/' resource: '../Controller/'
type: annotation type: annotation
chill_main_admin_permissionsgroup:
resource: "@ChillMainBundle/config/routes/permissionsgroup.yaml"
prefix: "{_locale}/admin/permissionsgroup"
chill_main_admin_scope:
resource: "@ChillMainBundle/config/routes/scope.yaml"
prefix: "{_locale}/admin/scope"
chill_main_admin:
resource: "@ChillMainBundle/config/routes/center.yaml"
prefix: "{_locale}/admin/center"
chill_main_exports:
resource: "@ChillMainBundle/config/routes/exports.yaml"
prefix: "{_locale}/exports"
chill_postal_code:
resource: "@ChillMainBundle/config/routes/postal-code.yaml"
prefix: "{_locale}/postal-code"
chill_password:
resource: "@ChillMainBundle/config/routes/password.yaml"
prefix: "{_locale}/password"
chill_password_recover:
resource: "@ChillMainBundle/config/routes/password_recover.yaml"
prefix: "public/{_locale}/password"
chill_main_notification:
resource: "@ChillMainBundle/config/routes/notification.yaml"
prefix: "{_locale}/notification"
chill_crud: chill_crud:
resource: "@ChillMainBundle" resource: "@ChillMainBundle"
type: CRUD type: CRUD
@ -45,50 +13,6 @@ root:
path: /homepage path: /homepage
permanent: false permanent: false
chill_main_homepage_without_locale:
path: /homepage
controller: Chill\MainBundle\Controller\DefaultController::indexWithoutLocaleAction
chill_main_homepage:
path: /{_locale}/homepage
controller: Chill\MainBundle\Controller\DefaultController::indexAction
# chill_main_admin_central:
# path: /{_locale}/admin
# controller: Chill\MainBundle\Controller\AdminController::indexAction
# options:
# menus:
# admin_permissions:
# order: 0
# label: Main admin menu
#
chill_main_search:
path: /{_locale}/search.{_format}
controller: Chill\MainBundle\Controller\SearchController::searchAction
format: 'html' # sf4 check
requirements:
_format: html|json
chill_main_search_global:
path: '/api/1.0/search.{_format}'
controller: Chill\MainBundle\Controller\SearchController::searchApi
format: 'json'
requirements:
_format: 'json'
chill_main_advanced_search:
path: /{_locale}/search/advanced/{name}
controller: Chill\MainBundle\Controller\SearchController::advancedSearchAction
chill_main_advanced_search_list:
path: /{_locale}/search/advanced
controller: Chill\MainBundle\Controller\SearchController::advancedSearchListAction
login:
path: /login
controller: Chill\MainBundle\Controller\LoginController::loginAction
login_check: login_check:
path: /login_check path: /login_check

View File

@ -1,21 +0,0 @@
admin_center:
path: /
controller: Chill\MainBundle\Controller\CenterController::indexAction
admin_center_new:
path: /new
controller: Chill\MainBundle\Controller\CenterController::newAction
admin_center_create:
path: /create
controller: Chill\MainBundle\Controller\CenterController::createAction
methods: POST
admin_center_edit:
path: /{id}/edit
controller: Chill\MainBundle\Controller\CenterController::editAction
admin_center_update:
path: /{id}/update
controller: Chill\MainBundle\Controller\CenterController::updateAction
methods: [POST, PUT]

View File

@ -1,17 +0,0 @@
chill_main_export_index:
path: /
controller: Chill\MainBundle\Controller\ExportController::indexAction
chill_main_export_new:
path: /new/{alias}
controller: Chill\MainBundle\Controller\ExportController::newAction
chill_main_export_generate:
path: /generate/{alias}
controller: Chill\MainBundle\Controller\ExportController::generateAction
methods: [GET]
chill_main_export_download:
path: /download/{alias}
controller: Chill\MainBundle\Controller\ExportController::downloadResultAction
methods: [ GET ]

View File

@ -1,4 +0,0 @@
change_my_password:
path: /edit
controller: Chill\MainBundle\Controller\PasswordController::userPasswordAction

View File

@ -1,15 +0,0 @@
password_recover:
path: /recover
controller: Chill\MainBundle\Controller\PasswordController::recoverAction
password_request_recover:
path: /request-recover
controller: Chill\MainBundle\Controller\PasswordController::requestRecoverAction
password_request_recover_confirm:
path: /request-confirm
controller: Chill\MainBundle\Controller\PasswordController::requestRecoverConfirmAction
password_request_recover_changed:
path: /request-changed
controller: Chill\MainBundle\Controller\PasswordController::changeConfirmedAction

View File

@ -1,35 +0,0 @@
admin_permissionsgroup:
path: /
controller: Chill\MainBundle\Controller\PermissionsGroupController::indexAction
admin_permissionsgroup_show:
path: /{id}/show
controller: Chill\MainBundle\Controller\PermissionsGroupController::showAction
admin_permissionsgroup_new:
path: /new
controller: Chill\MainBundle\Controller\PermissionsGroupController::newAction
admin_permissionsgroup_create:
path: /create
controller: Chill\MainBundle\Controller\PermissionsGroupController::createAction
methods: POST
admin_permissionsgroup_edit:
path: /{id}/edit
controller: Chill\MainBundle\Controller\PermissionsGroupController::editAction
admin_permissionsgroup_update:
path: /{id}/update
controller: Chill\MainBundle\Controller\PermissionsGroupController::updateAction
methods: [POST, PUT]
admin_permissionsgroup_delete_role_scope:
path: /{pgid}/delete_link_role_scope/{rsid}
controller: Chill\MainBundle\Controller\PermissionsGroupController::deleteLinkRoleScopeAction
methods: [DELETE]
admin_permissionsgroup_add_role_scope:
path: /{id}/add_link_role_scope
controller: Chill\MainBundle\Controller\PermissionsGroupController::addLinkRoleScopeAction
methods: [PUT]

View File

@ -1,4 +0,0 @@
chill_main_postal_code_search:
path: /search
controller: Chill\MainBundle\Controller\PostalCodeController::searchAction

View File

@ -1,21 +0,0 @@
admin_scope:
path: /
controller: Chill\MainBundle\Controller\ScopeController::indexAction
admin_scope_new:
path: /new
controller: Chill\MainBundle\Controller\ScopeController::newAction
admin_scope_create:
path: /create
controller: Chill\MainBundle\Controller\ScopeController::createAction
methods: POST
admin_scope_edit:
path: /{id}/edit
controller: Chill\MainBundle\Controller\ScopeController::editAction
admin_scope_update:
path: /{id}/update
controller: Chill\MainBundle\Controller\ScopeController::updateAction
methods: [POST, PUT]

View File

@ -57,6 +57,7 @@ class AccompanyingPeriodController extends AbstractController
/** /**
* @throws \Exception * @throws \Exception
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/accompanying-period/close", name="chill_person_accompanying_period_close")
*/ */
public function closeAction(int $person_id, Request $request): Response public function closeAction(int $person_id, Request $request): Response
{ {
@ -134,6 +135,9 @@ class AccompanyingPeriodController extends AbstractController
]); ]);
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/accompanying-period/create", name="chill_person_accompanying_period_create")
*/
public function createAction(int $person_id, Request $request): Response public function createAction(int $person_id, Request $request): Response
{ {
$person = $this->_getPerson($person_id); $person = $this->_getPerson($person_id);
@ -199,6 +203,7 @@ class AccompanyingPeriodController extends AbstractController
/** /**
* @ParamConverter("person", options={"id": "person_id"}) * @ParamConverter("person", options={"id": "person_id"})
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/accompanying-period", name="chill_person_accompanying_period_list")
*/ */
public function listAction(Person $person): Response public function listAction(Person $person): Response
{ {
@ -224,6 +229,9 @@ class AccompanyingPeriodController extends AbstractController
]); ]);
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/accompanying-period/open", name="chill_person_accompanying_period_open")
*/
public function openAction(int $person_id, Request $request): Response public function openAction(int $person_id, Request $request): Response
{ {
$person = $this->_getPerson($person_id); $person = $this->_getPerson($person_id);
@ -306,6 +314,9 @@ class AccompanyingPeriodController extends AbstractController
]); ]);
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/accompanying-period/{period_id}/re-open", name="chill_person_accompanying_period_re_open")
*/
public function reOpenAction(int $person_id, int $period_id, Request $request): Response public function reOpenAction(int $person_id, int $period_id, Request $request): Response
{ {
/** @var Person $person */ /** @var Person $person */
@ -353,6 +364,7 @@ class AccompanyingPeriodController extends AbstractController
/** /**
* @throws Exception * @throws Exception
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/accompanying-period/{period_id}/update", name="chill_person_accompanying_period_update")
*/ */
public function updateAction(int $person_id, int $period_id, Request $request): Response public function updateAction(int $person_id, int $period_id, Request $request): Response
{ {

View File

@ -53,6 +53,7 @@ class AdminController extends AbstractController
/** /**
* @return \Symfony\Component\HttpFoundation\RedirectResponse * @return \Symfony\Component\HttpFoundation\RedirectResponse
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/person_redirect_to_main", name="chill_person_admin_redirect_to_admin_index", options={null})
*/ */
public function redirectToAdminIndexAction() public function redirectToAdminIndexAction()
{ {

View File

@ -40,6 +40,9 @@ class PersonAddressController extends AbstractController
$this->validator = $validator; $this->validator = $validator;
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/address/create", name="chill_person_address_create", methods={"POST"})
*/
public function createAction($person_id, Request $request) public function createAction($person_id, Request $request)
{ {
$person = $this->getDoctrine()->getManager() $person = $this->getDoctrine()->getManager()
@ -95,6 +98,9 @@ class PersonAddressController extends AbstractController
]); ]);
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/address/{address_id}/edit", name="chill_person_address_edit")
*/
public function editAction($person_id, $address_id) public function editAction($person_id, $address_id)
{ {
$person = $this->getDoctrine()->getManager() $person = $this->getDoctrine()->getManager()
@ -123,6 +129,9 @@ class PersonAddressController extends AbstractController
]); ]);
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/address/list", name="chill_person_address_list")
*/
public function listAction($person_id) public function listAction($person_id)
{ {
$person = $this->getDoctrine()->getManager() $person = $this->getDoctrine()->getManager()
@ -145,6 +154,9 @@ class PersonAddressController extends AbstractController
]); ]);
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/address/new", name="chill_person_address_new")
*/
public function newAction($person_id) public function newAction($person_id)
{ {
$person = $this->getDoctrine()->getManager() $person = $this->getDoctrine()->getManager()
@ -172,6 +184,9 @@ class PersonAddressController extends AbstractController
]); ]);
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/address/{address_id}/update", name="chill_person_address_update")
*/
public function updateAction($person_id, $address_id, Request $request) public function updateAction($person_id, $address_id, Request $request)
{ {
$person = $this->getDoctrine()->getManager() $person = $this->getDoctrine()->getManager()

View File

@ -59,6 +59,9 @@ final class PersonController extends AbstractController
) { ) {
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/general/edit", name="chill_person_general_edit")
*/
public function editAction($person_id, Request $request) public function editAction($person_id, Request $request)
{ {
$person = $this->_getPerson($person_id); $person = $this->_getPerson($person_id);
@ -157,6 +160,7 @@ final class PersonController extends AbstractController
* *
* The next post compare the data with previous one and, if yes, show a * The next post compare the data with previous one and, if yes, show a
* review page if there are "alternate persons". * review page if there are "alternate persons".
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/new", name="chill_person_new")
*/ */
public function newAction(Request $request): Response public function newAction(Request $request): Response
{ {
@ -252,6 +256,9 @@ final class PersonController extends AbstractController
); );
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/general", name="chill_person_view")
*/
public function viewAction(int $person_id) public function viewAction(int $person_id)
{ {
$person = $this->_getPerson($person_id); $person = $this->_getPerson($person_id);

View File

@ -38,6 +38,9 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
{ {
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person1_id}/duplicate/{person2_id}/confirm", name="chill_person_duplicate_confirm")
*/
public function confirmAction($person1_id, $person2_id, Request $request) public function confirmAction($person1_id, $person2_id, Request $request)
{ {
if ($person1_id === $person2_id) { if ($person1_id === $person2_id) {
@ -99,6 +102,9 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
]); ]);
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/find-manually", name="chill_person_find_manually_duplicate")
*/
public function findManuallyDuplicateAction($person_id, Request $request) public function findManuallyDuplicateAction($person_id, Request $request)
{ {
$person = $this->_getPerson($person_id); $person = $this->_getPerson($person_id);
@ -149,6 +155,9 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
]); ]);
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person1_id}/duplicate/{person2_id}/not-duplicate", name="chill_person_duplicate_not_duplicate")
*/
public function notDuplicateAction($person1_id, $person2_id) public function notDuplicateAction($person1_id, $person2_id)
{ {
[$person1, $person2] = $this->_getPersonsByPriority($person1_id, $person2_id); [$person1, $person2] = $this->_getPersonsByPriority($person1_id, $person2_id);
@ -175,6 +184,9 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
return $this->redirectToRoute('chill_person_duplicate_view', ['person_id' => $person1->getId()]); return $this->redirectToRoute('chill_person_duplicate_view', ['person_id' => $person1->getId()]);
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person1_id}/duplicate/{person2_id}/remove-not-duplicate", name="chill_person_remove_duplicate_not_duplicate")
*/
public function removeNotDuplicateAction($person1_id, $person2_id) public function removeNotDuplicateAction($person1_id, $person2_id)
{ {
[$person1, $person2] = $this->_getPersonsByPriority($person1_id, $person2_id); [$person1, $person2] = $this->_getPersonsByPriority($person1_id, $person2_id);
@ -196,6 +208,9 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
return $this->redirectToRoute('chill_person_duplicate_view', ['person_id' => $person1->getId()]); return $this->redirectToRoute('chill_person_duplicate_view', ['person_id' => $person1->getId()]);
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/duplicate/view", name="chill_person_duplicate_view")
*/
public function viewAction($person_id, PersonNotDuplicateRepository $personNotDuplicateRepository) public function viewAction($person_id, PersonNotDuplicateRepository $personNotDuplicateRepository)
{ {
$person = $this->_getPerson($person_id); $person = $this->_getPerson($person_id);

View File

@ -29,6 +29,9 @@ final class PersonResourceController extends AbstractController
{ {
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/resources/{resource_id}/delete", name="chill_person_resource_delete")
*/
public function deleteAction(Request $request, $person_id, $resource_id): Response public function deleteAction(Request $request, $person_id, $resource_id): Response
{ {
$personOwner = $this->personRepository->find($person_id); $personOwner = $this->personRepository->find($person_id);
@ -75,6 +78,9 @@ final class PersonResourceController extends AbstractController
); );
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/resources/{resource_id}/edit", name="chill_person_resource_edit")
*/
public function editAction(Request $request, $resource_id, $person_id): Response public function editAction(Request $request, $resource_id, $person_id): Response
{ {
$resource = $this->personResourceRepository->find($resource_id); $resource = $this->personResourceRepository->find($resource_id);
@ -109,6 +115,9 @@ final class PersonResourceController extends AbstractController
); );
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/resources/list", name="chill_person_resource_list")
*/
public function listAction(Request $request, $person_id) public function listAction(Request $request, $person_id)
{ {
$personOwner = $this->personRepository->find($person_id); $personOwner = $this->personRepository->find($person_id);
@ -126,6 +135,9 @@ final class PersonResourceController extends AbstractController
); );
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/resources/new", name="chill_person_resource_new")
*/
public function newAction(Request $request, $person_id) public function newAction(Request $request, $person_id)
{ {
$personOwner = $this->personRepository->find($person_id); $personOwner = $this->personRepository->find($person_id);

View File

@ -26,6 +26,9 @@ class TimelinePersonController extends AbstractController
{ {
} }
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/timeline", name="chill_person_timeline")
*/
public function personAction(Request $request, $person_id) public function personAction(Request $request, $person_id)
{ {
$person = $this->getDoctrine() $person = $this->getDoctrine()

View File

@ -62,8 +62,6 @@ final class PersonDuplicateControllerViewTest extends WebTestCase
/** /**
* @dataProvider providePersonData * @dataProvider providePersonData
* @param int $personId
* @param int $person2Id
* @return void * @return void
*/ */
public function testViewDuplicatePerson(int $personId, int $person2Id): void public function testViewDuplicatePerson(int $personId, int $person2Id): void

View File

@ -1,130 +1,3 @@
chill_person_view:
path: /{_locale}/person/{person_id}/general
controller: Chill\PersonBundle\Controller\PersonController::viewAction
chill_person_general_edit:
path: /{_locale}/person/{person_id}/general/edit
controller: Chill\PersonBundle\Controller\PersonController::editAction
chill_person_general_update:
path: /{_locale}/person/{person_id}/general/update
controller: Chill\PersonBundle\Controller\PersonController::updateAction
chill_person_new:
path: /{_locale}/person/new
controller: Chill\PersonBundle\Controller\PersonController::newAction
chill_person_review:
path: /{_locale}/person/review
controller: Chill\PersonBundle\Controller\PersonController::reviewAction
chill_person_create:
path: /{_locale}/person/create
controller: Chill\PersonBundle\Controller\PersonController::createAction
chill_person_search:
path: /{_locale}/person/search
controller: Chill\PersonBundle\Controller\PersonController::searchAction
options:
menus:
main:
order: 30
label: Search within persons
chill_person_accompanying_period_list:
path: /{_locale}/person/{person_id}/accompanying-period
controller: Chill\PersonBundle\Controller\AccompanyingPeriodController::listAction
chill_person_accompanying_period_create:
path: /{_locale}/person/{person_id}/accompanying-period/create
controller: Chill\PersonBundle\Controller\AccompanyingPeriodController::createAction
chill_person_accompanying_period_update:
path: /{_locale}/person/{person_id}/accompanying-period/{period_id}/update
controller: Chill\PersonBundle\Controller\AccompanyingPeriodController::updateAction
chill_person_accompanying_period_close:
path: /{_locale}/person/{person_id}/accompanying-period/close
controller: Chill\PersonBundle\Controller\AccompanyingPeriodController::closeAction
chill_person_accompanying_period_open:
path: /{_locale}/person/{person_id}/accompanying-period/open
controller: Chill\PersonBundle\Controller\AccompanyingPeriodController::openAction
chill_person_accompanying_period_re_open:
path: /{_locale}/person/{person_id}/accompanying-period/{period_id}/re-open
controller: Chill\PersonBundle\Controller\AccompanyingPeriodController::reOpenAction
chill_person_resource_list:
path: /{_locale}/person/{person_id}/resources/list
controller: Chill\PersonBundle\Controller\PersonResourceController::listAction
chill_person_resource_new:
path: /{_locale}/person/{person_id}/resources/new
controller: Chill\PersonBundle\Controller\PersonResourceController::newAction
chill_person_resource_edit:
path: /{_locale}/person/{person_id}/resources/{resource_id}/edit
controller: Chill\PersonBundle\Controller\PersonResourceController::editAction
chill_person_resource_delete:
path: /{_locale}/person/{person_id}/resources/{resource_id}/delete
controller: Chill\PersonBundle\Controller\PersonResourceController::deleteAction
chill_person_address_list:
path: /{_locale}/person/{person_id}/address/list
controller: Chill\PersonBundle\Controller\PersonAddressController::listAction
chill_person_address_create:
path: /{_locale}/person/{person_id}/address/create
controller: Chill\PersonBundle\Controller\PersonAddressController::createAction
methods: [POST]
chill_person_address_new:
path: /{_locale}/person/{person_id}/address/new
controller: Chill\PersonBundle\Controller\PersonAddressController::newAction
chill_person_address_edit:
path: /{_locale}/person/{person_id}/address/{address_id}/edit
controller: Chill\PersonBundle\Controller\PersonAddressController::editAction
chill_person_address_update:
path: /{_locale}/person/{person_id}/address/{address_id}/update
controller: Chill\PersonBundle\Controller\PersonAddressController::updateAction
chill_person_timeline:
path: /{_locale}/person/{person_id}/timeline
controller: Chill\PersonBundle\Controller\TimelinePersonController::personAction
chill_person_duplicate_view:
path: /{_locale}/person/{person_id}/duplicate/view
controller: Chill\PersonBundle\Controller\PersonDuplicateController::viewAction
chill_person_duplicate_confirm:
path: /{_locale}/person/{person1_id}/duplicate/{person2_id}/confirm
controller: Chill\PersonBundle\Controller\PersonDuplicateController::confirmAction
chill_person_duplicate_not_duplicate:
path: /{_locale}/person/{person1_id}/duplicate/{person2_id}/not-duplicate
controller: Chill\PersonBundle\Controller\PersonDuplicateController::notDuplicateAction
chill_person_remove_duplicate_not_duplicate:
path: /{_locale}/person/{person1_id}/duplicate/{person2_id}/remove-not-duplicate
controller: Chill\PersonBundle\Controller\PersonDuplicateController::removeNotDuplicateAction
chill_person_find_manually_duplicate:
path: /{_locale}/person/{person_id}/find-manually
controller: Chill\PersonBundle\Controller\PersonDuplicateController::findManuallyDuplicateAction
chill_person_admin_redirect_to_admin_index:
path: /{_locale}/admin/person_redirect_to_main
controller: Chill\PersonBundle\Controller\AdminController::redirectToAdminIndexAction
options:
menus:
admin_person:
order: 0
label: Main admin menu
chill_person_controllers: chill_person_controllers:
resource: "@ChillPersonBundle/Controller" resource: "@ChillPersonBundle/Controller"
type: annotation type: annotation