Run symfonysetlist up to symfony_70

This commit is contained in:
2025-05-28 15:46:25 +02:00
parent abb786495a
commit 13a9e14450
128 changed files with 515 additions and 518 deletions

View File

@@ -92,7 +92,7 @@ final class AccompanyingCourseApiController extends ApiController
]);
}
#[Route(path: '/api/1.0/person/accompanying-course/list/by-recent-attributions')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/accompanying-course/list/by-recent-attributions')]
public function findMyRecentCourseAttribution(Request $request): JsonResponse
{
$this->denyAccessUnlessGranted('ROLE_USER');
@@ -258,7 +258,7 @@ final class AccompanyingCourseApiController extends ApiController
return $this->addRemoveSomething('socialissue', $id, $request, $_format, 'socialIssue', SocialIssue::class, ['groups' => ['read']]);
}
#[Route(path: '/api/1.0/person/accompanying-course/{id}/referrers-suggested.{_format}', requirements: ['_format' => 'json'], name: 'chill_api_person_accompanying_period_referrers_suggested')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/accompanying-course/{id}/referrers-suggested.{_format}', requirements: ['_format' => 'json'], name: 'chill_api_person_accompanying_period_referrers_suggested')]
public function suggestReferrals(AccompanyingPeriod $period, string $_format = 'json'): JsonResponse
{
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::EDIT, $period);
@@ -287,7 +287,7 @@ final class AccompanyingCourseApiController extends ApiController
/**
* @ParamConverter("accompanyingCourse", options={"id": "id"})
*/
#[Route(path: '/api/1.0/person/accompanying-course/{id}/confidential.json', name: 'chill_api_person_accompanying_period_confidential')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/accompanying-course/{id}/confidential.json', name: 'chill_api_person_accompanying_period_confidential')]
public function toggleConfidentialApi(AccompanyingPeriod $accompanyingCourse, mixed $id, Request $request): \Symfony\Component\HttpFoundation\JsonResponse
{
if ('POST' === $request->getMethod()) {
@@ -304,7 +304,7 @@ final class AccompanyingCourseApiController extends ApiController
/**
* @ParamConverter("accompanyingCourse", options={"id": "id"})
*/
#[Route(path: '/api/1.0/person/accompanying-course/{id}/intensity.json', name: 'chill_api_person_accompanying_period_intensity')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/accompanying-course/{id}/intensity.json', name: 'chill_api_person_accompanying_period_intensity')]
public function toggleIntensityApi(AccompanyingPeriod $accompanyingCourse, Request $request): \Symfony\Component\HttpFoundation\JsonResponse
{
if ('POST' === $request->getMethod()) {
@@ -321,7 +321,7 @@ final class AccompanyingCourseApiController extends ApiController
/**
* @ParamConverter("accompanyingPeriod", options={"id": "id"})
*/
#[Route(path: '/api/1.0/person/accompanying-course/{id}/works.json', name: 'chill_api_person_accompanying_period_works')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/accompanying-course/{id}/works.json', name: 'chill_api_person_accompanying_period_works')]
public function worksByAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod): JsonResponse
{
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::SEE, $accompanyingPeriod);

View File

@@ -43,7 +43,7 @@ class AccompanyingCourseCommentController extends AbstractController
*
* @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"})
*/
#[Route(path: '/{_locale}/parcours/{accompanying_period_id}/comments', name: 'chill_person_accompanying_period_comment_list')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/parcours/{accompanying_period_id}/comments', name: 'chill_person_accompanying_period_comment_list')]
public function commentAction(AccompanyingPeriod $accompanyingCourse, Request $request): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::SEE_DETAILS, $accompanyingCourse);
@@ -118,7 +118,7 @@ class AccompanyingCourseCommentController extends AbstractController
/**
* Delete an existing comment.
*/
#[Route(path: '/{_locale}/parcours/comment/{id}/delete', name: 'chill_person_accompanying_period_comment_delete')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/parcours/comment/{id}/delete', name: 'chill_person_accompanying_period_comment_delete')]
public function deleteAction(AccompanyingPeriod\Comment $comment, Request $request): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodCommentVoter::DELETE, $comment);
@@ -149,12 +149,12 @@ class AccompanyingCourseCommentController extends AbstractController
return $this->render('@ChillPerson/AccompanyingCourse/Comment/confirm_delete.html.twig', [
'comment' => $comment,
'delete_form' => $form->createView(),
'delete_form' => $form,
'accompanyingCourse' => $comment->getAccompanyingPeriod(),
]);
}
#[Route(path: '/{_locale}/parcours/comment/{id}/pin', name: 'chill_person_accompanying_period_comment_pin')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/parcours/comment/{id}/pin', name: 'chill_person_accompanying_period_comment_pin')]
public function pinComment(AccompanyingPeriod\Comment $comment): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::EDIT, $comment->getAccompanyingPeriod());
@@ -170,7 +170,7 @@ class AccompanyingCourseCommentController extends AbstractController
]);
}
#[Route(path: '/{_locale}/parcours/comment/{id}/unpin', name: 'chill_person_accompanying_period_comment_unpin')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/parcours/comment/{id}/unpin', name: 'chill_person_accompanying_period_comment_unpin')]
public function unpinComment(AccompanyingPeriod\Comment $comment): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::EDIT, $comment->getAccompanyingPeriod());

View File

@@ -51,7 +51,7 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
/**
* @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"})
*/
#[Route(path: '/{_locale}/parcours/{accompanying_period_id}/close', name: 'chill_person_accompanying_course_close')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/parcours/{accompanying_period_id}/close', name: 'chill_person_accompanying_course_close')]
public function closeAction(AccompanyingPeriod $accompanyingCourse, Request $request): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::EDIT, $accompanyingCourse);
@@ -87,7 +87,7 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
}
return $this->render('@ChillPerson/AccompanyingCourse/close.html.twig', [
'form' => $form->createView(),
'form' => $form,
'accompanyingCourse' => $accompanyingCourse,
]);
}
@@ -97,7 +97,7 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
*
* @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"})
*/
#[Route(path: '/{_locale}/parcours/{accompanying_period_id}/delete', name: 'chill_person_accompanying_course_delete')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/parcours/{accompanying_period_id}/delete', name: 'chill_person_accompanying_course_delete')]
public function deleteAction(Request $request, AccompanyingPeriod $accompanyingCourse): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -141,7 +141,7 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
return $this->render($view, [
'accompanyingCourse' => $accompanyingCourse,
'person_id' => $person_id,
'delete_form' => $form->createView(),
'delete_form' => $form,
]);
}
@@ -152,7 +152,7 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
*
* @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"})
*/
#[Route(path: '/{_locale}/parcours/{accompanying_period_id}/edit', name: 'chill_person_accompanying_course_edit')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/parcours/{accompanying_period_id}/edit', name: 'chill_person_accompanying_course_edit')]
public function editAction(AccompanyingPeriod $accompanyingCourse): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::EDIT, $accompanyingCourse);
@@ -169,7 +169,7 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
*
* @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"})
*/
#[Route(path: '/{_locale}/parcours/{accompanying_period_id}/history', name: 'chill_person_accompanying_course_history')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/parcours/{accompanying_period_id}/history', name: 'chill_person_accompanying_course_history')]
public function historyAction(AccompanyingPeriod $accompanyingCourse): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::SEE, $accompanyingCourse);
@@ -184,7 +184,7 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
*
* @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"})
*/
#[Route(path: '/{_locale}/parcours/{accompanying_period_id}', name: 'chill_person_accompanying_course_index')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/parcours/{accompanying_period_id}', name: 'chill_person_accompanying_course_index')]
public function indexAction(AccompanyingPeriod $accompanyingCourse): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::SEE, $accompanyingCourse);
@@ -225,7 +225,7 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
]);
}
#[Route(path: '/{_locale}/person/parcours/new', name: 'chill_person_accompanying_course_new')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/parcours/new', name: 'chill_person_accompanying_course_new')]
public function newAction(Request $request): Response
{
$user = $this->security->getUser();
@@ -263,7 +263,7 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
]);
}
#[Route(path: '/{_locale}/person/household/parcours/new', name: 'chill_household_accompanying_course_new')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/household/parcours/new', name: 'chill_household_accompanying_course_new')]
public function newHouseholdParcoursAction(Request $request): Response
{
$user = $this->getUser();
@@ -303,7 +303,7 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
/**
* @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"})
*/
#[Route(path: '/{_locale}/parcours/{accompanying_period_id}/open', name: 'chill_person_accompanying_course_reopen')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/parcours/{accompanying_period_id}/open', name: 'chill_person_accompanying_course_reopen')]
public function reOpenAction(AccompanyingPeriod $accompanyingCourse, Request $request): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::SEE, $accompanyingCourse);
@@ -325,7 +325,7 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
}
return $this->render('@ChillPerson/AccompanyingCourse/re_open.html.twig', [
'form' => $form->createView(),
'form' => $form,
'accompanyingCourse' => $accompanyingCourse,
]);
}

View File

@@ -29,7 +29,7 @@ class AccompanyingCourseWorkApiController extends ApiController
private readonly Security $security,
) {}
#[Route(path: '/api/1.0/person/accompanying-period/work/my-near-end')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/accompanying-period/work/my-near-end')]
public function myWorksNearEndDate(Request $request): JsonResponse
{
$user = $this->security->getUser();

View File

@@ -43,7 +43,7 @@ final class AccompanyingCourseWorkController extends AbstractController
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
) {}
#[Route(path: '{_locale}/person/accompanying-period/{id}/work/new', name: 'chill_person_accompanying_period_work_new', methods: ['GET'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/person/accompanying-period/{id}/work/new', name: 'chill_person_accompanying_period_work_new', methods: ['GET'])]
public function createWork(AccompanyingPeriod $period): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodWorkVoter::CREATE, $period);
@@ -70,7 +70,7 @@ final class AccompanyingCourseWorkController extends AbstractController
]);
}
#[Route(path: '{_locale}/person/accompanying-period/work/{id}/delete', name: 'chill_person_accompanying_period_work_delete', methods: ['GET', 'POST', 'DELETE'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/person/accompanying-period/work/{id}/delete', name: 'chill_person_accompanying_period_work_delete', methods: ['GET', 'POST', 'DELETE'])]
public function deleteWork(AccompanyingPeriodWork $work, Request $request): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodWorkVoter::UPDATE, $work);
@@ -106,11 +106,11 @@ final class AccompanyingCourseWorkController extends AbstractController
return $this->render('@ChillPerson/AccompanyingCourseWork/delete.html.twig', [
'accompanyingCourse' => $work->getAccompanyingPeriod(),
'work' => $work,
'delete_form' => $form->createView(),
'delete_form' => $form,
]);
}
#[Route(path: '{_locale}/person/accompanying-period/work/{id}/edit', name: 'chill_person_accompanying_period_work_edit', methods: ['GET'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/person/accompanying-period/work/{id}/edit', name: 'chill_person_accompanying_period_work_edit', methods: ['GET'])]
public function editWork(AccompanyingPeriodWork $work): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodWorkVoter::UPDATE, $work);
@@ -124,7 +124,7 @@ final class AccompanyingCourseWorkController extends AbstractController
]);
}
#[Route(path: '{_locale}/person/accompanying-period/{id}/work', name: 'chill_person_accompanying_period_work_list', methods: ['GET'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/person/accompanying-period/{id}/work', name: 'chill_person_accompanying_period_work_list', methods: ['GET'])]
public function listWorkByAccompanyingPeriod(AccompanyingPeriod $period): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodWorkVoter::SEE, $period);
@@ -156,7 +156,7 @@ final class AccompanyingCourseWorkController extends AbstractController
]);
}
#[Route(path: '{_locale}/person/accompanying-period/work/{id}/show', name: 'chill_person_accompanying_period_work_show', methods: ['GET'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/person/accompanying-period/work/{id}/show', name: 'chill_person_accompanying_period_work_show', methods: ['GET'])]
public function showWork(AccompanyingPeriodWork $work): Response
{
if (null === $work) {

View File

@@ -22,7 +22,7 @@ class AccompanyingCourseWorkEvaluationDocumentController extends AbstractControl
{
public function __construct(private readonly Security $security) {}
#[Route(path: '{_locale}/person/accompanying-period/work/evaluation/document/{id}/show', name: 'chill_person_accompanying_period_work_evaluation_document_show', methods: ['GET'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/person/accompanying-period/work/evaluation/document/{id}/show', name: 'chill_person_accompanying_period_work_evaluation_document_show', methods: ['GET'])]
public function showAccompanyingCourseWork(AccompanyingPeriodWorkEvaluationDocument $document): Response
{
$work = $document->getAccompanyingPeriodWorkEvaluation()->getAccompanyingPeriodWork();

View File

@@ -45,7 +45,7 @@ class AccompanyingPeriodController extends AbstractController
/**
* @throws \Exception
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/accompanying-period/close', name: 'chill_person_accompanying_period_close')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/accompanying-period/close', name: 'chill_person_accompanying_period_close')]
public function closeAction(int $person_id, Request $request): Response
{
$person = $this->_getPerson($person_id);
@@ -116,13 +116,13 @@ class AccompanyingPeriodController extends AbstractController
}
return $this->render('@ChillPerson/AccompanyingPeriod/form.html.twig', [
'form' => $form->createView(),
'form' => $form,
'person' => $person,
'accompanying_period' => $current,
]);
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/accompanying-period/create', name: 'chill_person_accompanying_period_create')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/accompanying-period/create', name: 'chill_person_accompanying_period_create')]
public function createAction(int $person_id, Request $request): Response
{
$person = $this->_getPerson($person_id);
@@ -180,7 +180,7 @@ class AccompanyingPeriodController extends AbstractController
}
return $this->render('@ChillPerson/AccompanyingPeriod/form.html.twig', [
'form' => $form->createView(),
'form' => $form,
'person' => $person,
'accompanying_period' => $accompanyingPeriod,
]);
@@ -189,7 +189,7 @@ class AccompanyingPeriodController extends AbstractController
/**
* @ParamConverter("person", options={"id"="person_id"})
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/accompanying-period', name: 'chill_person_accompanying_period_list')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/accompanying-period', name: 'chill_person_accompanying_period_list')]
public function listAction(Person $person): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::SEE, $person);
@@ -214,7 +214,7 @@ class AccompanyingPeriodController extends AbstractController
]);
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/accompanying-period/open', name: 'chill_person_accompanying_period_open')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/accompanying-period/open', name: 'chill_person_accompanying_period_open')]
public function openAction(int $person_id, Request $request): Response
{
$person = $this->_getPerson($person_id);
@@ -291,13 +291,13 @@ class AccompanyingPeriodController extends AbstractController
}
return $this->render('@ChillPerson/AccompanyingPeriod/form.html.twig', [
'form' => $form->createView(),
'form' => $form,
'person' => $person,
'accompanying_period' => $accompanyingPeriod,
]);
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/accompanying-period/{period_id}/re-open', name: 'chill_person_accompanying_period_re_open')]
#[\Symfony\Component\Routing\Attribute\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
{
/** @var Person $person */
@@ -346,7 +346,7 @@ class AccompanyingPeriodController extends AbstractController
/**
* @throws Exception
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/accompanying-period/{period_id}/update', name: 'chill_person_accompanying_period_update')]
#[\Symfony\Component\Routing\Attribute\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
{
$em = $this->managerRegistry->getManager();
@@ -411,7 +411,7 @@ class AccompanyingPeriodController extends AbstractController
}
return $this->render('@ChillPerson/AccompanyingPeriod/form.html.twig', [
'form' => $form->createView(),
'form' => $form,
'person' => $person,
'accompanying_period' => $accompanyingPeriod,
]);

View File

@@ -33,7 +33,7 @@ class AccompanyingPeriodRegulationListController
{
public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly \Twig\Environment $engine, private readonly FormFactoryInterface $formFactory, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
#[Route(path: '/{_locale}/person/periods/undispatched', name: 'chill_person_course_list_regulation')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/periods/undispatched', name: 'chill_person_course_list_regulation')]
public function listRegul(Request $request): Response
{
if (!$this->security->isGranted('ROLE_USER') || !$this->security->getUser() instanceof User) {

View File

@@ -31,7 +31,7 @@ class AccompanyingPeriodWorkEvaluationApiController
{
public function __construct(private readonly AccompanyingPeriodWorkEvaluationRepository $accompanyingPeriodWorkEvaluationRepository, private readonly DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private readonly SerializerInterface $serializer, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security) {}
#[Route(path: '/api/1.0/person/docgen/template/by-evaluation/{id}.{_format}', requirements: ['format' => 'json'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/docgen/template/by-evaluation/{id}.{_format}', requirements: ['format' => 'json'])]
public function listTemplateByEvaluation(Evaluation $evaluation, string $_format): JsonResponse
{
if ('json' !== $_format) {
@@ -61,7 +61,7 @@ class AccompanyingPeriodWorkEvaluationApiController
), JsonResponse::HTTP_OK, [], true);
}
#[Route(path: '/api/1.0/person/accompanying-period/work/evaluation/my-near-end')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/accompanying-period/work/evaluation/my-near-end')]
public function myWorksNearEndDate(Request $request): JsonResponse
{
$total = $this->accompanyingPeriodWorkEvaluationRepository

View File

@@ -35,7 +35,7 @@ class AccompanyingPeriodWorkEvaluationDocumentDuplicateController
private readonly ChillUrlGeneratorInterface $urlGenerator,
) {}
#[Route('/api/1.0/person/accompanying-course-work-evaluation-document/{id}/duplicate', methods: ['POST'])]
#[\Symfony\Component\Routing\Attribute\Route('/api/1.0/person/accompanying-course-work-evaluation-document/{id}/duplicate', methods: ['POST'])]
public function duplicateApi(AccompanyingPeriodWorkEvaluationDocument $document): Response
{
$work = $document->getAccompanyingPeriodWorkEvaluation()->getAccompanyingPeriodWork();
@@ -56,7 +56,7 @@ class AccompanyingPeriodWorkEvaluationDocumentDuplicateController
);
}
#[Route('/{_locale}/person/accompanying-course-work-evaluation-document/{id}/duplicate', name: 'chill_person_accompanying_period_work_evaluation_document_duplicate', methods: ['POST'])]
#[\Symfony\Component\Routing\Attribute\Route('/{_locale}/person/accompanying-course-work-evaluation-document/{id}/duplicate', name: 'chill_person_accompanying_period_work_evaluation_document_duplicate', methods: ['POST'])]
public function duplicate(AccompanyingPeriodWorkEvaluationDocument $document): Response
{
$work = $document->getAccompanyingPeriodWorkEvaluation()->getAccompanyingPeriodWork();

View File

@@ -19,25 +19,25 @@ use Symfony\Component\Routing\Annotation\Route;
*/
class AdminController extends AbstractController
{
#[Route(path: '/{_locale}/admin/accompanying-course', name: 'chill_accompanying-course_admin_index')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/accompanying-course', name: 'chill_accompanying-course_admin_index')]
public function indexAccompanyingCourseAdminAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillPerson/Admin/indexAccompanyingCourse.html.twig');
}
#[Route(path: '/{_locale}/admin/household', name: 'chill_household_admin_index')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/household', name: 'chill_household_admin_index')]
public function indexHouseholdAdminAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillPerson/Admin/indexHousehold.html.twig');
}
#[Route(path: '/{_locale}/admin/person', name: 'chill_person_admin_index')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/person', name: 'chill_person_admin_index')]
public function indexPersonAdminAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillPerson/Admin/indexPerson.html.twig');
}
#[Route(path: '/{_locale}/admin/social-work', name: 'chill_social-work_admin_index')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/social-work', name: 'chill_social-work_admin_index')]
public function indexSocialWorkAdminAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillPerson/Admin/indexSocialWork.html.twig');
@@ -46,7 +46,7 @@ class AdminController extends AbstractController
/**
* @return \Symfony\Component\HttpFoundation\RedirectResponse
*/
#[Route(path: '/{_locale}/admin/person_redirect_to_main', name: 'chill_person_admin_redirect_to_admin_index', options: [null])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/person_redirect_to_main', name: 'chill_person_admin_redirect_to_admin_index', options: [null])]
public function redirectToAdminIndexAction(): \Symfony\Component\HttpFoundation\RedirectResponse
{
return $this->redirectToRoute('chill_main_admin_central');

View File

@@ -46,7 +46,7 @@ class HouseholdApiController extends ApiController
/**
* @return \Symfony\Component\HttpFoundation\JsonResponse
*/
#[Route(path: '/api/1.0/person/household/by-address-reference/{id}.json', name: 'chill_api_person_household_by_address_reference')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/household/by-address-reference/{id}.json', name: 'chill_api_person_household_by_address_reference')]
public function getHouseholdByAddressReference(AddressReference $addressReference): Response
{
$this->denyAccessUnlessGranted('ROLE_USER');
@@ -68,7 +68,7 @@ class HouseholdApiController extends ApiController
/**
* Add an address to a household.
*/
#[Route(path: '/api/1.0/person/household/{id}/address.{_format}', name: 'chill_api_single_household_address', methods: ['POST'], requirements: ['_format' => 'json'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/household/{id}/address.{_format}', name: 'chill_api_single_household_address', methods: ['POST'], requirements: ['_format' => 'json'])]
public function householdAddressApi(Household $household, Request $request, string $_format): Response
{
$this->denyAccessUnlessGranted(HouseholdVoter::EDIT, $household);
@@ -112,7 +112,7 @@ class HouseholdApiController extends ApiController
/**
* @ParamConverter("household", options={"id": "household_id"})
*/
#[Route(path: '/api/1.0/person/address/suggest/by-household/{household_id}.{_format}', name: 'chill_person_address_suggest_by_household', requirements: ['_format' => 'json'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/address/suggest/by-household/{household_id}.{_format}', name: 'chill_person_address_suggest_by_household', requirements: ['_format' => 'json'])]
public function suggestAddressByHousehold(Household $household, string $_format): \Symfony\Component\HttpFoundation\JsonResponse
{
// TODO add acl

View File

@@ -46,7 +46,7 @@ class HouseholdCompositionController extends AbstractController
private readonly UrlGeneratorInterface $urlGenerator,
) {}
#[Route(path: '/{_locale}/person/household/{household_id}/composition/{composition_id}/delete', name: 'chill_person_household_composition_delete')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/household/{household_id}/composition/{composition_id}/delete', name: 'chill_person_household_composition_delete')]
public function deleteAction(Request $request, mixed $household_id, mixed $composition_id): Response
{
$composition = $this->householdCompositionRepository->find($composition_id);
@@ -87,12 +87,12 @@ class HouseholdCompositionController extends AbstractController
[
'household' => $household,
'composition' => $composition,
'form' => $form->createView(),
'form' => $form,
]
);
}
#[Route(path: '/{_locale}/person/household/{id}/composition/index', name: 'chill_person_household_composition_index')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/household/{id}/composition/index', name: 'chill_person_household_composition_index')]
public function index(Household $household, Request $request): Response
{
if (!$this->security->isGranted(HouseholdVoter::SEE, $household)) {
@@ -117,7 +117,7 @@ class HouseholdCompositionController extends AbstractController
));
}
#[Route(path: '/{_locale}/person/household/{id}/composition/new', name: 'chill_person_household_composition_new')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/household/{id}/composition/new', name: 'chill_person_household_composition_new')]
public function newAction(Household $household, Request $request): Response
{
if ($this->security->isGranted(HouseholdVoter::EDIT, $household)) {

View File

@@ -29,7 +29,7 @@ use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
#[Route(path: '/{_locale}/person/household')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/household')]
class HouseholdController extends AbstractController
{
public function __construct(private readonly TranslatorInterface $translator, private readonly PositionRepository $positionRepository, private readonly SerializerInterface $serializer, private readonly Security $security, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
@@ -37,7 +37,7 @@ class HouseholdController extends AbstractController
/**
* @ParamConverter("household", options={"id": "household_id"})
*/
#[Route(path: '/{household_id}/accompanying-period', name: 'chill_person_household_accompanying_period', methods: ['GET', 'HEAD'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{household_id}/accompanying-period', name: 'chill_person_household_accompanying_period', methods: ['GET', 'HEAD'])]
public function accompanyingPeriod(Request $request, Household $household): \Symfony\Component\HttpFoundation\Response
{
$currentMembers = $household->getCurrentPersons();
@@ -87,7 +87,7 @@ class HouseholdController extends AbstractController
/**
* @ParamConverter("household", options={"id": "household_id"})
*/
#[Route(path: '/{household_id}/address/edit', name: 'chill_person_household_address_edit', methods: ['GET', 'HEAD', 'POST'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{household_id}/address/edit', name: 'chill_person_household_address_edit', methods: ['GET', 'HEAD', 'POST'])]
public function addressEdit(Request $request, Household $household): \Symfony\Component\HttpFoundation\Response
{
// TODO ACL
@@ -109,7 +109,7 @@ class HouseholdController extends AbstractController
/**
* @ParamConverter("household", options={"id": "household_id"})
*/
#[Route(path: '/{household_id}/addresses', name: 'chill_person_household_addresses', methods: ['GET', 'HEAD'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{household_id}/addresses', name: 'chill_person_household_addresses', methods: ['GET', 'HEAD'])]
public function addresses(Request $request, Household $household): \Symfony\Component\HttpFoundation\Response
{
// TODO ACL
@@ -135,7 +135,7 @@ class HouseholdController extends AbstractController
/**
* @ParamConverter("household", options={"id": "household_id"})
*/
#[Route(path: '/{household_id}/address/move', name: 'chill_person_household_address_move', methods: ['GET', 'HEAD', 'POST'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{household_id}/address/move', name: 'chill_person_household_address_move', methods: ['GET', 'HEAD', 'POST'])]
public function addressMove(Request $request, Household $household): \Symfony\Component\HttpFoundation\Response
{
// TODO ACL
@@ -151,7 +151,7 @@ class HouseholdController extends AbstractController
/**
* @ParamConverter("household", options={"id": "household_id"})
*/
#[Route(path: '/{household_id}/address/edit_valid_from', name: 'chill_person_household_address_valid_from_edit', methods: ['GET', 'HEAD', 'POST'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{household_id}/address/edit_valid_from', name: 'chill_person_household_address_valid_from_edit', methods: ['GET', 'HEAD', 'POST'])]
public function addressValidFromEdit(Request $request, Household $household): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$this->denyAccessUnlessGranted(HouseholdVoter::EDIT, $household);
@@ -195,7 +195,7 @@ class HouseholdController extends AbstractController
[
'household' => $household,
'address' => $address,
'form' => $form->createView(),
'form' => $form,
]
);
}
@@ -203,7 +203,7 @@ class HouseholdController extends AbstractController
/**
* @ParamConverter("household", options={"id": "household_id"})
*/
#[Route(path: '/{household_id}/members/metadata/edit', name: 'chill_person_household_members_metadata_edit', methods: ['GET', 'POST'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{household_id}/members/metadata/edit', name: 'chill_person_household_members_metadata_edit', methods: ['GET', 'POST'])]
public function editHouseholdMetadata(Request $request, Household $household): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
// TODO ACL
@@ -229,14 +229,14 @@ class HouseholdController extends AbstractController
return $this->render('@ChillPerson/Household/edit_member_metadata.html.twig', [
'household' => $household,
'form' => $form->createView(),
'form' => $form,
]);
}
/**
* @ParamConverter("household", options={"id": "household_id"})
*/
#[Route(path: '/{household_id}/relationship', name: 'chill_person_household_relationship', methods: ['GET', 'HEAD'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{household_id}/relationship', name: 'chill_person_household_relationship', methods: ['GET', 'HEAD'])]
public function showRelationship(Request $request, Household $household): \Symfony\Component\HttpFoundation\Response
{
$jsonString = $this->serializer->serialize(
@@ -257,7 +257,7 @@ class HouseholdController extends AbstractController
/**
* @ParamConverter("household", options={"id": "household_id"})
*/
#[Route(path: '/{household_id}/summary', name: 'chill_person_household_summary', methods: ['GET', 'HEAD'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{household_id}/summary', name: 'chill_person_household_summary', methods: ['GET', 'HEAD'])]
public function summary(Request $request, Household $household): \Symfony\Component\HttpFoundation\Response
{
// TODO ACL

View File

@@ -55,7 +55,7 @@ class HouseholdMemberController extends ApiController
$this->household_fields_visibility = $parameterBag->get('chill_person.household_fields');
}
#[Route(path: '/{_locale}/person/household/member/{id}/edit', name: 'chill_person_household_member_edit')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/household/member/{id}/edit', name: 'chill_person_household_member_edit')]
public function editMembership(Request $request, HouseholdMember $member): Response
{
// TODO ACL
@@ -80,7 +80,7 @@ class HouseholdMemberController extends ApiController
return $this->render('@ChillPerson/Household/Member/edit.html.twig', [
'household' => $member->getHousehold(),
'member' => $member,
'form' => $form->createView(),
'form' => $form,
]);
}
@@ -94,7 +94,7 @@ class HouseholdMemberController extends ApiController
* * allow_leave_without_household: if present, the editor will allow
* to leave household without joining another
*/
#[Route(path: '/{_locale}/person/household/members/editor', name: 'chill_person_household_members_editor')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/household/members/editor', name: 'chill_person_household_members_editor')]
public function editor(Request $request): \Symfony\Component\HttpFoundation\Response
{
$ids = $request->query->all('persons');
@@ -173,7 +173,7 @@ class HouseholdMemberController extends ApiController
]);
}
#[Route(path: '/api/1.0/person/household/members/move.{_format}', name: 'chill_api_person_household_members_move')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/household/members/move.{_format}', name: 'chill_api_person_household_members_move')]
public function move(Request $request, mixed $_format): Response
{
try {

View File

@@ -31,7 +31,7 @@ class PersonAddressController extends AbstractController
*/
public function __construct(private readonly ValidatorInterface $validator, private readonly TranslatorInterface $translator, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/address/create', name: 'chill_person_address_create', methods: ['POST'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/address/create', name: 'chill_person_address_create', methods: ['POST'])]
public function createAction(mixed $person_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$person = $this->managerRegistry->getManager()
@@ -82,11 +82,11 @@ class PersonAddressController extends AbstractController
return $this->render('@ChillPerson/Address/new.html.twig', [
'person' => $person,
'form' => $form->createView(),
'form' => $form,
]);
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/address/{address_id}/edit', name: 'chill_person_address_edit')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/address/{address_id}/edit', name: 'chill_person_address_edit')]
public function editAction(mixed $person_id, mixed $address_id): \Symfony\Component\HttpFoundation\Response
{
$person = $this->managerRegistry->getManager()
@@ -110,11 +110,11 @@ class PersonAddressController extends AbstractController
return $this->render('@ChillPerson/Address/edit.html.twig', [
'person' => $person,
'address' => $address,
'form' => $form->createView(),
'form' => $form,
]);
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/address/list', name: 'chill_person_address_list')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/address/list', name: 'chill_person_address_list')]
public function listAction(mixed $person_id): \Symfony\Component\HttpFoundation\Response
{
$person = $this->managerRegistry->getManager()
@@ -136,7 +136,7 @@ class PersonAddressController extends AbstractController
]);
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/address/new', name: 'chill_person_address_new')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/address/new', name: 'chill_person_address_new')]
public function newAction(mixed $person_id): \Symfony\Component\HttpFoundation\Response
{
$person = $this->managerRegistry->getManager()
@@ -159,11 +159,11 @@ class PersonAddressController extends AbstractController
return $this->render('@ChillPerson/Address/new.html.twig', [
'person' => $person,
'form' => $form->createView(),
'form' => $form,
]);
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/address/{address_id}/update', name: 'chill_person_address_update')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/address/{address_id}/update', name: 'chill_person_address_update')]
public function updateAction(mixed $person_id, mixed $address_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$person = $this->managerRegistry->getManager()
@@ -212,7 +212,7 @@ class PersonAddressController extends AbstractController
return $this->render('@ChillPerson/Address/edit.html.twig', [
'person' => $person,
'address' => $address,
'form' => $form->createView(),
'form' => $form,
]);
}

View File

@@ -36,7 +36,7 @@ class PersonApiController extends ApiController
$this->showCenters = $parameterBag->get('chill_main')['acl']['form_show_centers'];
}
#[Route(path: '/api/1.0/person/creation/authorized-centers', name: 'chill_person_person_creation_authorized_centers')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/creation/authorized-centers', name: 'chill_person_person_creation_authorized_centers')]
public function authorizedCentersForCreation(): Response
{
$centers = $this->authorizedCenterOnPersonCreation->getCenters();
@@ -49,7 +49,7 @@ class PersonApiController extends ApiController
);
}
#[Route(path: '/api/1.0/person/config/alt_names.{_format}', name: 'chill_person_config_alt_names', requirements: ['_format' => 'json'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/config/alt_names.{_format}', name: 'chill_person_config_alt_names', requirements: ['_format' => 'json'])]
public function configAltNames(Request $request, string $_format): Response
{
$configAltNamesChoices = $this->configPersonAltNameHelper->getChoices();
@@ -74,7 +74,7 @@ class PersonApiController extends ApiController
/**
* @ParamConverter("person", options={"id": "person_id"})
*/
#[Route(path: '/api/1.0/person/address/suggest/by-person/{person_id}.{_format}', name: 'chill_person_address_suggest_by_person', requirements: ['_format' => 'json'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/address/suggest/by-person/{person_id}.{_format}', name: 'chill_person_address_suggest_by_person', requirements: ['_format' => 'json'])]
public function suggestAddress(Person $person, Request $request, string $_format): Response
{
$this->denyAccessUnlessGranted(PersonVoter::SEE, $person);

View File

@@ -49,7 +49,7 @@ final class PersonController extends AbstractController
private readonly EntityManagerInterface $em,
) {}
#[Route(path: '/{_locale}/person/{person_id}/general/edit', name: 'chill_person_general_edit')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/general/edit', name: 'chill_person_general_edit')]
public function editAction(int $person_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$person = $this->_getPerson($person_id);
@@ -95,7 +95,7 @@ final class PersonController extends AbstractController
return $this->render(
'@ChillPerson/Person/edit.html.twig',
['person' => $person, 'form' => $form->createView()]
['person' => $person, 'form' => $form]
);
}
@@ -116,7 +116,7 @@ final class PersonController extends AbstractController
/**
* @ParamConverter("person", options={"id": "person_id"})
*/
#[Route(path: '/{_locale}/person/household/{person_id}/history', name: 'chill_person_household_person_history', methods: ['GET', 'POST'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/household/{person_id}/history', name: 'chill_person_household_person_history', methods: ['GET', 'POST'])]
public function householdHistoryByPerson(Request $request, Person $person): Response
{
$this->denyAccessUnlessGranted(
@@ -145,7 +145,7 @@ final class PersonController extends AbstractController
* The next post compare the data with previous one and, if yes, show a
* review page if there are "alternate persons".
*/
#[Route(path: '/{_locale}/person/new', name: 'chill_person_new')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/new', name: 'chill_person_new')]
public function newAction(Request $request): Response
{
$person = new Person();
@@ -234,13 +234,13 @@ final class PersonController extends AbstractController
return $this->render(
'@ChillPerson/Person/create.html.twig',
[
'form' => $form->createView(),
'form' => $form,
'alternatePersons' => $alternatePersons ?? [],
]
);
}
#[Route(path: '/{_locale}/person/{person_id}/general', name: 'chill_person_view')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/general', name: 'chill_person_view')]
public function viewAction(int $person_id): \Symfony\Component\HttpFoundation\Response
{
$person = $this->_getPerson($person_id);

View File

@@ -44,7 +44,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
private readonly TranslatorInterface $translator,
) {}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person1_id}/duplicate/{person2_id}/confirm', name: 'chill_person_duplicate_confirm')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person1_id}/duplicate/{person2_id}/confirm', name: 'chill_person_duplicate_confirm')]
public function confirmAction(mixed $person1_id, mixed $person2_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
if ($person1_id === $person2_id) {
@@ -100,11 +100,11 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
return $this->render('@ChillPerson/PersonDuplicate/confirm.html.twig', [
'person' => $person1,
'person2' => $person2,
'form' => $form->createView(),
'form' => $form,
]);
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/find-manually', name: 'chill_person_find_manually_duplicate')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/find-manually', name: 'chill_person_find_manually_duplicate')]
public function findManuallyDuplicateAction(mixed $person_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$person = $this->_getPerson($person_id);
@@ -156,11 +156,11 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
return $this->render('@ChillPerson/PersonDuplicate/find_manually.html.twig', [
'person' => $person,
'form' => $form->createView(),
'form' => $form,
]);
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person1_id}/duplicate/{person2_id}/not-duplicate', name: 'chill_person_duplicate_not_duplicate')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person1_id}/duplicate/{person2_id}/not-duplicate', name: 'chill_person_duplicate_not_duplicate')]
public function notDuplicateAction(mixed $person1_id, mixed $person2_id): \Symfony\Component\HttpFoundation\RedirectResponse
{
$user = $this->security->getUser();
@@ -193,7 +193,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
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')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person1_id}/duplicate/{person2_id}/remove-not-duplicate', name: 'chill_person_remove_duplicate_not_duplicate')]
public function removeNotDuplicateAction(mixed $person1_id, mixed $person2_id): \Symfony\Component\HttpFoundation\RedirectResponse
{
[$person1, $person2] = $this->_getPersonsByPriority($person1_id, $person2_id);
@@ -215,7 +215,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
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')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/duplicate/view', name: 'chill_person_duplicate_view')]
public function viewAction(mixed $person_id, PersonNotDuplicateRepository $personNotDuplicateRepository): \Symfony\Component\HttpFoundation\Response
{
$person = $this->_getPerson($person_id);

View File

@@ -27,7 +27,7 @@ final class PersonResourceController extends AbstractController
{
public function __construct(private readonly PersonResourceRepository $personResourceRepository, private readonly PersonRepository $personRepository, private readonly EntityManagerInterface $em, private readonly TranslatorInterface $translator) {}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/resources/{resource_id}/delete', name: 'chill_person_resource_delete')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/resources/{resource_id}/delete', name: 'chill_person_resource_delete')]
public function deleteAction(Request $request, mixed $person_id, mixed $resource_id): Response
{
$personOwner = $this->personRepository->find($person_id);
@@ -68,12 +68,12 @@ final class PersonResourceController extends AbstractController
[
'person' => $personOwner,
'resource' => $resource,
'form' => $form->createView(),
'form' => $form,
]
);
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/resources/{resource_id}/edit', name: 'chill_person_resource_edit')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/resources/{resource_id}/edit', name: 'chill_person_resource_edit')]
public function editAction(Request $request, mixed $resource_id, mixed $person_id): Response
{
$resource = $this->personResourceRepository->find($resource_id);
@@ -102,13 +102,13 @@ final class PersonResourceController extends AbstractController
[
'person' => $personOwner,
'resource' => $resource,
'form' => $form->createView(),
'form' => $form,
'action' => 'edit',
]
);
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/resources/list', name: 'chill_person_resource_list')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/resources/list', name: 'chill_person_resource_list')]
public function listAction(Request $request, mixed $person_id): \Symfony\Component\HttpFoundation\Response
{
$personOwner = $this->personRepository->find($person_id);
@@ -126,7 +126,7 @@ final class PersonResourceController extends AbstractController
);
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/resources/new', name: 'chill_person_resource_new')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/resources/new', name: 'chill_person_resource_new')]
public function newAction(Request $request, mixed $person_id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$personOwner = $this->personRepository->find($person_id);
@@ -151,7 +151,7 @@ final class PersonResourceController extends AbstractController
return $this->render(
'@ChillPerson/PersonResource/create.html.twig',
[
'form' => $form->createView(),
'form' => $form,
'person' => $personOwner,
]
);

View File

@@ -26,7 +26,7 @@ class PersonSignatureController extends AbstractController
private readonly EntityWorkflowManager $entityWorkflowManager,
) {}
#[Route(path: '/{_locale}/signatures/by-person/{id}', name: 'chill_person_signature_list')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/signatures/by-person/{id}', name: 'chill_person_signature_list')]
public function listSignatures(Person $person): Response
{
$this->denyAccessUnlessGranted(PersonVoter::SEE, $person);

View File

@@ -41,7 +41,7 @@ class ReassignAccompanyingPeriodController extends AbstractController
{
public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly UserRepository $userRepository, private readonly AccompanyingPeriodRepository $courseRepository, private readonly \Twig\Environment $engine, private readonly FormFactoryInterface $formFactory, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly UserRender $userRender, private readonly EntityManagerInterface $em) {}
#[Route(path: '/{_locale}/person/accompanying-periods/reassign', name: 'chill_course_list_reassign')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/accompanying-periods/reassign', name: 'chill_course_list_reassign')]
public function listAction(Request $request): Response
{
if (!$this->security->isGranted(AccompanyingPeriodVoter::REASSIGN_BULK)) {

View File

@@ -29,7 +29,7 @@ final class ResidentialAddressController extends AbstractController
{
public function __construct(private readonly UrlGeneratorInterface $generator, private readonly TranslatorInterface $translator, private readonly ResidentialAddressRepository $residentialAddressRepository, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
#[Route(path: '/{_locale}/person/residential-address/{id}/delete', name: 'chill_person_residential_address_delete')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/residential-address/{id}/delete', name: 'chill_person_residential_address_delete')]
public function deleteAction(Request $request, ResidentialAddress $residentialAddress): Response
{
$this->denyAccessUnlessGranted(PersonVoter::UPDATE, $residentialAddress->getPerson());
@@ -51,11 +51,11 @@ final class ResidentialAddressController extends AbstractController
return $this->render('@ChillPerson/ResidentialAddress/delete.html.twig', [
'person' => $residentialAddress->getPerson(),
'residentialAddress' => $residentialAddress,
'delete_form' => $form->createView(),
'delete_form' => $form,
]);
}
#[Route(path: '/{_locale}/person/residential-address/{id}/edit', name: 'chill_person_residential_address_edit')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/residential-address/{id}/edit', name: 'chill_person_residential_address_edit')]
public function editAction(Request $request, ResidentialAddress $residentialAddress): Response
{
if ($request->query->has('kind')) {
@@ -85,11 +85,11 @@ final class ResidentialAddressController extends AbstractController
return $this->render('@ChillPerson/ResidentialAddress/edit.html.twig', [
'residentialAddress' => $residentialAddress,
'person' => $person,
'form' => $form->createView(),
'form' => $form,
]);
}
#[Route(path: '/{_locale}/person/{id}/residential-address/list', name: 'chill_person_residential_address_list')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{id}/residential-address/list', name: 'chill_person_residential_address_list')]
public function listAction(Request $request, Person $person): Response
{
$this->denyAccessUnlessGranted(PersonVoter::SEE, $person);
@@ -102,7 +102,7 @@ final class ResidentialAddressController extends AbstractController
]);
}
#[Route(path: '/{_locale}/person/{id}/residential-address/new', name: 'chill_person_residential_address_new')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{id}/residential-address/new', name: 'chill_person_residential_address_new')]
public function newAction(Request $request, Person $person): Response
{
$residentialAddress = new ResidentialAddress();
@@ -133,7 +133,7 @@ final class ResidentialAddressController extends AbstractController
return $this->render('@ChillPerson/ResidentialAddress/new.html.twig', [
'person' => $person,
'form' => $form->createView(),
'form' => $form,
]);
}
}

View File

@@ -37,7 +37,7 @@ class SocialActionCSVExportController extends AbstractController
* @throws CannotInsertRecord
* @throws Exception
*/
#[Route(path: '/{_locale}/admin/social-work/social-action/export/list.{_format}', name: 'chill_person_social_action_export_list', requirements: ['_format' => 'csv'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/social-work/social-action/export/list.{_format}', name: 'chill_person_social_action_export_list', requirements: ['_format' => 'csv'])]
public function socialActionList(Request $request, string $_format = 'csv'): StreamedResponse
{
if (!$this->security->isGranted('ROLE_ADMIN')) {

View File

@@ -37,7 +37,7 @@ class SocialIssueCSVExportController extends AbstractController
* @throws CannotInsertRecord
* @throws Exception
*/
#[Route(path: '/{_locale}/admin/social-work/social-issue/export/list.{_format}', name: 'chill_person_social_issue_export_list', requirements: ['_format' => 'csv'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/social-work/social-issue/export/list.{_format}', name: 'chill_person_social_issue_export_list', requirements: ['_format' => 'csv'])]
public function socialIssueList(Request $request, string $_format = 'csv'): StreamedResponse
{
if (!$this->security->isGranted('ROLE_ADMIN')) {

View File

@@ -27,7 +27,7 @@ class SocialWorkEvaluationApiController extends AbstractController
/**
* @ParamConverter("action", options={"id": "action_id"})
*/
#[Route(path: '/api/1.0/person/social-work/evaluation/by-social-action/{action_id}.json', name: 'chill_person_evaluation_index_by_social_action', requirements: ['_format' => 'json'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/person/social-work/evaluation/by-social-action/{action_id}.json', name: 'chill_person_evaluation_index_by_social_action', requirements: ['_format' => 'json'])]
public function listEvaluationBySocialAction(SocialAction $action): Response
{
$evaluations = $action->getEvaluations()->filter(static fn (Evaluation $eval) => $eval->isActive());

View File

@@ -24,7 +24,7 @@ class TimelinePersonController extends AbstractController
{
public function __construct(protected EventDispatcherInterface $eventDispatcher, protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/timeline', name: 'chill_person_timeline')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person_id}/timeline', name: 'chill_person_timeline')]
public function personAction(Request $request, mixed $person_id): \Symfony\Component\HttpFoundation\Response
{
$person = $this->managerRegistry

View File

@@ -22,8 +22,8 @@ use Doctrine\ORM\NoResultException;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Contracts\Translation\TranslatorInterface;
use Symfony\Component\Routing\Attribute\Route;
class UserAccompanyingPeriodController extends AbstractController
{
@@ -105,7 +105,7 @@ class UserAccompanyingPeriodController extends AbstractController
]);
}
#[Route(path: '/{_locale}/person/accompanying-periods/my/drafts', name: 'chill_person_accompanying_period_draft_user')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/accompanying-periods/my/drafts', name: 'chill_person_accompanying_period_draft_user')]
public function listDraftsAction(): Response
{
$total = $this->accompanyingPeriodRepository->countBy(['user' => $this->getUser(), 'step' => 'DRAFT']);