mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Run symfonysetlist up to symfony_70
This commit is contained in:
parent
220110a403
commit
382f20c6ad
@ -24,7 +24,7 @@ return static function (RectorConfig $rectorConfig): void {
|
||||
Rector\Php55\Rector\String_\StringClassNameToClassConstantRector::class => __DIR__.'src/Bundle/ChillMainBundle/Service/Notifier/LegacyOvhCloudFactory.php',
|
||||
]);
|
||||
|
||||
$rectorConfig->symfonyContainerXml(__DIR__.'/var/cache/dev/test/App_KernelTestDebugContainer.xml ');
|
||||
// $rectorConfig->symfonyContainerXml(__DIR__.'/var/cache/dev/test/App_KernelTestDebugContainer.xml ');
|
||||
$rectorConfig->symfonyContainerPhp(__DIR__.'/tests/symfony-container.php');
|
||||
|
||||
// $rectorConfig->cacheClass(\Rector\Caching\ValueObject\Storage\FileCacheStorage::class);
|
||||
@ -53,6 +53,9 @@ return static function (RectorConfig $rectorConfig): void {
|
||||
Rector\Symfony\Set\SymfonySetList::SYMFONY_60,
|
||||
Rector\Symfony\Set\SymfonySetList::SYMFONY_61,
|
||||
Rector\Symfony\Set\SymfonySetList::SYMFONY_62,
|
||||
Rector\Symfony\Set\SymfonySetList::SYMFONY_63,
|
||||
Rector\Symfony\Set\SymfonySetList::SYMFONY_64,
|
||||
Rector\Symfony\Set\SymfonySetList::SYMFONY_70,
|
||||
Rector\Doctrine\Set\DoctrineSetList::DOCTRINE_CODE_QUALITY,
|
||||
]);
|
||||
|
||||
|
@ -74,7 +74,7 @@ final class ActivityController extends AbstractController
|
||||
/**
|
||||
* Deletes a Activity entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/activity/{id}/delete', name: 'chill_activity_activity_delete', methods: ['GET', 'POST', 'DELETE'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/activity/{id}/delete', name: 'chill_activity_activity_delete', methods: ['GET', 'POST', 'DELETE'])]
|
||||
public function deleteAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$view = null;
|
||||
@ -134,7 +134,7 @@ final class ActivityController extends AbstractController
|
||||
|
||||
return $this->render($view, [
|
||||
'activity' => $activity,
|
||||
'delete_form' => $form->createView(),
|
||||
'delete_form' => $form,
|
||||
'person' => $person,
|
||||
'accompanyingCourse' => $accompanyingPeriod,
|
||||
]);
|
||||
@ -143,7 +143,7 @@ final class ActivityController extends AbstractController
|
||||
/**
|
||||
* Displays a form to edit an existing Activity entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/activity/{id}/edit', name: 'chill_activity_activity_edit', methods: ['GET', 'POST', 'PUT'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/activity/{id}/edit', name: 'chill_activity_activity_edit', methods: ['GET', 'POST', 'PUT'])]
|
||||
public function editAction(int $id, Request $request): Response
|
||||
{
|
||||
$view = null;
|
||||
@ -226,8 +226,8 @@ final class ActivityController extends AbstractController
|
||||
|
||||
return $this->render($view, [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $form->createView(),
|
||||
'delete_form' => $deleteForm->createView(),
|
||||
'edit_form' => $form,
|
||||
'delete_form' => $deleteForm,
|
||||
'person' => $person,
|
||||
'accompanyingCourse' => $accompanyingPeriod,
|
||||
'activity_json' => $activity_array,
|
||||
@ -237,7 +237,7 @@ final class ActivityController extends AbstractController
|
||||
/**
|
||||
* Lists all Activity entities.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/activity/', name: 'chill_activity_activity_list')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/activity/', name: 'chill_activity_activity_list')]
|
||||
public function listAction(Request $request): Response
|
||||
{
|
||||
$view = null;
|
||||
@ -341,7 +341,7 @@ final class ActivityController extends AbstractController
|
||||
return $filterBuilder->build();
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/activity/new', name: 'chill_activity_activity_new', methods: ['POST', 'GET'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/activity/new', name: 'chill_activity_activity_new', methods: ['POST', 'GET'])]
|
||||
public function newAction(Request $request): Response
|
||||
{
|
||||
$view = null;
|
||||
@ -516,13 +516,13 @@ final class ActivityController extends AbstractController
|
||||
'person' => $person,
|
||||
'accompanyingCourse' => $accompanyingPeriod,
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'activity_json' => $activity_array,
|
||||
'default_location' => $defaultLocation,
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/activity/select-type', name: 'chill_activity_activity_select_type')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/activity/select-type', name: 'chill_activity_activity_select_type')]
|
||||
public function selectTypeAction(Request $request): Response
|
||||
{
|
||||
$view = null;
|
||||
@ -567,7 +567,7 @@ final class ActivityController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/activity/{id}/show', name: 'chill_activity_activity_show')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/activity/{id}/show', name: 'chill_activity_activity_show')]
|
||||
public function showAction(Request $request, int $id): Response
|
||||
{
|
||||
$entity = $this->activityRepository->find($id);
|
||||
@ -611,7 +611,7 @@ final class ActivityController extends AbstractController
|
||||
'person' => $person,
|
||||
'accompanyingCourse' => $accompanyingPeriod,
|
||||
'entity' => $entity,
|
||||
'delete_form' => $deleteForm->createView(),
|
||||
'delete_form' => $deleteForm,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
/**
|
||||
* Creates a new ActivityReasonCategory entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/create', name: 'chill_activity_activityreasoncategory_create', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/activityreasoncategory/create', name: 'chill_activity_activityreasoncategory_create', methods: ['POST'])]
|
||||
public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$entity = new ActivityReasonCategory();
|
||||
@ -44,14 +44,14 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
|
||||
return $this->render('@ChillActivity/ActivityReasonCategory/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/activityreasoncategory/{id}/edit', name: 'chill_activity_activityreasoncategory_edit')]
|
||||
public function editAction(mixed $id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -66,14 +66,14 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
|
||||
return $this->render('@ChillActivity/ActivityReasonCategory/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all ActivityReasonCategory entities.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/', name: 'chill_activity_activityreasoncategory')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/activityreasoncategory/', name: 'chill_activity_activityreasoncategory')]
|
||||
public function indexAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -88,7 +88,7 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
/**
|
||||
* Displays a form to create a new ActivityReasonCategory entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/new', name: 'chill_activity_activityreasoncategory_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/activityreasoncategory/new', name: 'chill_activity_activityreasoncategory_new')]
|
||||
public function newAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$entity = new ActivityReasonCategory();
|
||||
@ -96,14 +96,14 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
|
||||
return $this->render('@ChillActivity/ActivityReasonCategory/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds and displays a ActivityReasonCategory entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/{id}/show', name: 'chill_activity_activityreasoncategory_show')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/activityreasoncategory/{id}/show', name: 'chill_activity_activityreasoncategory_show')]
|
||||
public function showAction(mixed $id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -122,7 +122,7 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
/**
|
||||
* Edits an existing ActivityReasonCategory entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/{id}/update', name: 'chill_activity_activityreasoncategory_update', methods: ['POST', 'PUT'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/activityreasoncategory/{id}/update', name: 'chill_activity_activityreasoncategory_update', methods: ['POST', 'PUT'])]
|
||||
public function updateAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -144,7 +144,7 @@ class ActivityReasonCategoryController extends AbstractController
|
||||
|
||||
return $this->render('@ChillActivity/ActivityReasonCategory/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ class ActivityReasonController extends AbstractController
|
||||
/**
|
||||
* Creates a new ActivityReason entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/create', name: 'chill_activity_activityreason_create', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/activityreason/create', name: 'chill_activity_activityreason_create', methods: ['POST'])]
|
||||
public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$entity = new ActivityReason();
|
||||
@ -46,14 +46,14 @@ class ActivityReasonController extends AbstractController
|
||||
|
||||
return $this->render('@ChillActivity/ActivityReason/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/activityreason/{id}/edit', name: 'chill_activity_activityreason_edit')]
|
||||
public function editAction(mixed $id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -68,14 +68,14 @@ class ActivityReasonController extends AbstractController
|
||||
|
||||
return $this->render('@ChillActivity/ActivityReason/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all ActivityReason entities.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/', name: 'chill_activity_activityreason')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/activityreason/', name: 'chill_activity_activityreason')]
|
||||
public function indexAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -90,7 +90,7 @@ class ActivityReasonController extends AbstractController
|
||||
/**
|
||||
* Displays a form to create a new ActivityReason entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/new', name: 'chill_activity_activityreason_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/activityreason/new', name: 'chill_activity_activityreason_new')]
|
||||
public function newAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$entity = new ActivityReason();
|
||||
@ -98,14 +98,14 @@ class ActivityReasonController extends AbstractController
|
||||
|
||||
return $this->render('@ChillActivity/ActivityReason/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds and displays a ActivityReason entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/{id}/show', name: 'chill_activity_activityreason_show')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/activityreason/{id}/show', name: 'chill_activity_activityreason_show')]
|
||||
public function showAction(mixed $id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -124,7 +124,7 @@ class ActivityReasonController extends AbstractController
|
||||
/**
|
||||
* Edits an existing ActivityReason entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/{id}/update', name: 'chill_activity_activityreason_update', methods: ['POST', 'PUT'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/activityreason/{id}/update', name: 'chill_activity_activityreason_update', methods: ['POST', 'PUT'])]
|
||||
public function updateAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -146,7 +146,7 @@ class ActivityReasonController extends AbstractController
|
||||
|
||||
return $this->render('@ChillActivity/ActivityReason/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -18,14 +18,14 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
*/
|
||||
class AdminController extends AbstractController
|
||||
{
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activity', name: 'chill_activity_admin_index')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/activity', name: 'chill_activity_admin_index')]
|
||||
public function indexActivityAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
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')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/activity_redirect_to_main', name: 'chill_admin_aside_activity_redirect_to_admin_index', options: [null])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/activity_redirect_to_main', name: 'chill_admin_activity_redirect_to_admin_index')]
|
||||
public function redirectToAdminIndexAction(): \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
return $this->redirectToRoute('chill_main_admin_central');
|
||||
|
@ -41,7 +41,7 @@ class TimelineActivityProvider implements TimelineProviderInterface
|
||||
$this->user = $storage->getToken()->getUser();
|
||||
}
|
||||
|
||||
public function fetchQuery($context, array $args)
|
||||
public function fetchQuery($context, array $args): \Chill\MainBundle\Timeline\TimelineSingleQuery
|
||||
{
|
||||
if ('center' === $context) {
|
||||
return TimelineSingleQuery::fromArray($this->aclAwareRepository
|
||||
|
@ -19,7 +19,7 @@ use Symfony\Component\Routing\Annotation\Route;
|
||||
*/
|
||||
class AdminController extends AbstractController
|
||||
{
|
||||
#[Route(path: '/{_locale}/admin/aside-activity', name: 'chill_aside_activity_admin')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/aside-activity', name: 'chill_aside_activity_admin')]
|
||||
public function indexAdminAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillAsideActivity/Admin/index.html.twig');
|
||||
|
@ -82,7 +82,7 @@ abstract class AbstractElementController extends AbstractController
|
||||
|
||||
return $this->render($template, [
|
||||
'element' => $element,
|
||||
'delete_form' => $form->createView(),
|
||||
'delete_form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ abstract class AbstractElementController extends AbstractController
|
||||
|
||||
return $this->render($template, [
|
||||
'element' => $element,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
$entityStr => $entity,
|
||||
]);
|
||||
}
|
||||
@ -168,7 +168,7 @@ abstract class AbstractElementController extends AbstractController
|
||||
}
|
||||
|
||||
return $this->render($template, [
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
$entityStr => $entity,
|
||||
'element' => $element,
|
||||
]);
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class AdminController extends AbstractController
|
||||
{
|
||||
#[Route(path: '/{_locale}/admin/budget', name: 'chill_admin_budget')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/budget', name: 'chill_admin_budget')]
|
||||
public function indexAdminAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillBudget/Admin/index.html.twig');
|
||||
|
@ -21,7 +21,7 @@ use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class ChargeController extends AbstractElementController
|
||||
{
|
||||
#[Route(path: '{_locale}/budget/charge/{id}/delete', name: 'chill_budget_charge_delete')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/budget/charge/{id}/delete', name: 'chill_budget_charge_delete')]
|
||||
public function deleteAction(Request $request, #[MapEntity(id: 'id')] Charge $charge): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->_delete(
|
||||
@ -32,7 +32,7 @@ class ChargeController extends AbstractElementController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '{_locale}/budget/charge/{id}/edit', name: 'chill_budget_charge_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/budget/charge/{id}/edit', name: 'chill_budget_charge_edit')]
|
||||
public function editAction(Request $request, #[MapEntity(id: 'id')] Charge $charge): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->_edit(
|
||||
@ -46,7 +46,7 @@ class ChargeController extends AbstractElementController
|
||||
/**
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
#[Route(path: '{_locale}/budget/charge/by-person/{id}/new', name: 'chill_budget_charge_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/budget/charge/by-person/{id}/new', name: 'chill_budget_charge_new')]
|
||||
public function newAction(Request $request, #[MapEntity(id: 'id')] Person $person)
|
||||
{
|
||||
return $this->_new(
|
||||
@ -60,7 +60,7 @@ class ChargeController extends AbstractElementController
|
||||
/**
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
#[Route(path: '{_locale}/budget/charge/by-household/{id}/new', name: 'chill_budget_charge_household_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/budget/charge/by-household/{id}/new', name: 'chill_budget_charge_household_new')]
|
||||
public function newHouseholdAction(Request $request, #[MapEntity(id: 'id')] Household $household)
|
||||
{
|
||||
return $this->_new(
|
||||
@ -74,8 +74,8 @@ class ChargeController extends AbstractElementController
|
||||
/**
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
#[Route(path: '{_locale}/budget/charge/{id}/view', name: 'chill_budget_charge_view')]
|
||||
public function viewAction(#[MapEntity(id: 'id')] Charge $charge)
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/budget/charge/{id}/view', name: 'chill_budget_charge_view')]
|
||||
public function viewAction(#[MapEntity(id: 'id')] Charge $charge): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->_view($charge, '@ChillBudget/Charge/view.html.twig');
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class ElementController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly CalculatorManager $calculator, private readonly ResourceRepository $resourceRepository, private readonly ChargeRepository $chargeRepository) {}
|
||||
|
||||
#[Route(path: '{_locale}/budget/elements/by-person/{id}', name: 'chill_budget_elements_index')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/budget/elements/by-person/{id}', name: 'chill_budget_elements_index')]
|
||||
public function indexAction(#[MapEntity(id: 'id')] Person $person): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(BudgetElementVoter::SEE, $person);
|
||||
@ -47,7 +47,7 @@ class ElementController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '{_locale}/budget/elements/by-household/{id}', name: 'chill_budget_elements_household_index')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/budget/elements/by-household/{id}', name: 'chill_budget_elements_household_index')]
|
||||
public function indexHouseholdAction(#[MapEntity(id: 'id')] Household $household): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(BudgetElementVoter::SEE, $household);
|
||||
|
@ -22,7 +22,7 @@ use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class ResourceController extends AbstractElementController
|
||||
{
|
||||
#[Route(path: '{_locale}/budget/resource/{id}/delete', name: 'chill_budget_resource_delete')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/budget/resource/{id}/delete', name: 'chill_budget_resource_delete')]
|
||||
public function deleteAction(Request $request, #[MapEntity(id: 'id')] Resource $resource): Response
|
||||
{
|
||||
return $this->_delete(
|
||||
@ -33,7 +33,7 @@ class ResourceController extends AbstractElementController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '{_locale}/budget/resource/{id}/edit', name: 'chill_budget_resource_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/budget/resource/{id}/edit', name: 'chill_budget_resource_edit')]
|
||||
public function editAction(Request $request, #[MapEntity(id: 'id')] Resource $resource): Response
|
||||
{
|
||||
return $this->_edit(
|
||||
@ -47,7 +47,7 @@ class ResourceController extends AbstractElementController
|
||||
/**
|
||||
* Create a new budget element for a person.
|
||||
*/
|
||||
#[Route(path: '{_locale}/budget/resource/by-person/{id}/new', name: 'chill_budget_resource_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/budget/resource/by-person/{id}/new', name: 'chill_budget_resource_new')]
|
||||
public function newAction(Request $request, #[MapEntity(id: 'id')] Person $person): Response
|
||||
{
|
||||
return $this->_new(
|
||||
@ -61,7 +61,7 @@ class ResourceController extends AbstractElementController
|
||||
/**
|
||||
* Create new budget element for a household.
|
||||
*/
|
||||
#[Route(path: '{_locale}/budget/resource/by-household/{id}/new', name: 'chill_budget_resource_household_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/budget/resource/by-household/{id}/new', name: 'chill_budget_resource_household_new')]
|
||||
public function newHouseholdAction(Request $request, #[MapEntity(id: 'id')] Household $household): Response
|
||||
{
|
||||
return $this->_new(
|
||||
@ -72,7 +72,7 @@ class ResourceController extends AbstractElementController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '{_locale}/budget/resource/{id}/view', name: 'chill_budget_resource_view')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/budget/resource/{id}/view', name: 'chill_budget_resource_view')]
|
||||
public function viewAction(#[MapEntity(id: 'id')] Resource $resource): Response
|
||||
{
|
||||
return $this->_view($resource, '@ChillBudget/Resource/view.html.twig');
|
||||
|
@ -19,7 +19,7 @@ class AdminController extends AbstractController
|
||||
/**
|
||||
* Calendar admin.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/calendar', name: 'chill_calendar_admin_index')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/calendar', name: 'chill_calendar_admin_index')]
|
||||
public function indexAdminAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillCalendar/Admin/index.html.twig');
|
||||
|
@ -25,7 +25,7 @@ class CalendarAPIController extends ApiController
|
||||
{
|
||||
public function __construct(private readonly CalendarRepository $calendarRepository) {}
|
||||
|
||||
#[Route(path: '/api/1.0/calendar/calendar/by-user/{id}.{_format}', name: 'chill_api_single_calendar_list_by-user', requirements: ['_format' => 'json'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/calendar/calendar/by-user/{id}.{_format}', name: 'chill_api_single_calendar_list_by-user', requirements: ['_format' => 'json'])]
|
||||
public function listByUser(User $user, Request $request, string $_format): JsonResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_USER');
|
||||
|
@ -65,7 +65,7 @@ class CalendarController extends AbstractController
|
||||
/**
|
||||
* Delete a calendar item.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/calendar/{id}/delete', name: 'chill_calendar_calendar_delete')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/calendar/{id}/delete', name: 'chill_calendar_calendar_delete')]
|
||||
public function deleteAction(Request $request, Calendar $entity)
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -105,7 +105,7 @@ class CalendarController extends AbstractController
|
||||
|
||||
return $this->render($view, [
|
||||
'calendar' => $entity,
|
||||
'delete_form' => $form->createView(),
|
||||
'delete_form' => $form,
|
||||
'accompanyingCourse' => $accompanyingPeriod,
|
||||
'person' => $person,
|
||||
]);
|
||||
@ -114,7 +114,7 @@ class CalendarController extends AbstractController
|
||||
/**
|
||||
* Edit a calendar item.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/calendar/calendar/{id}/edit', name: 'chill_calendar_calendar_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/calendar/calendar/{id}/edit', name: 'chill_calendar_calendar_edit')]
|
||||
public function editAction(Calendar $entity, Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(CalendarVoter::EDIT, $entity);
|
||||
@ -182,7 +182,7 @@ class CalendarController extends AbstractController
|
||||
|
||||
return $this->render($view, [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'accompanyingCourse' => $entity->getAccompanyingPeriod(),
|
||||
'person' => $entity->getPerson(),
|
||||
'entity_json' => $entity_array,
|
||||
@ -193,7 +193,7 @@ class CalendarController extends AbstractController
|
||||
/**
|
||||
* Lists all Calendar entities.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/calendar/calendar/by-period/{id}', name: 'chill_calendar_calendar_list_by_period')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/calendar/calendar/by-period/{id}', name: 'chill_calendar_calendar_list_by_period')]
|
||||
public function listActionByCourse(AccompanyingPeriod $accompanyingPeriod): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(CalendarVoter::SEE, $accompanyingPeriod);
|
||||
@ -226,7 +226,7 @@ class CalendarController extends AbstractController
|
||||
/**
|
||||
* Lists all Calendar entities on a person.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/calendar/calendar/by-person/{id}', name: 'chill_calendar_calendar_list_by_person')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/calendar/calendar/by-person/{id}', name: 'chill_calendar_calendar_list_by_person')]
|
||||
public function listActionByPerson(Person $person): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(CalendarVoter::SEE, $person);
|
||||
@ -256,7 +256,7 @@ class CalendarController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/calendar/calendar/my', name: 'chill_calendar_calendar_list_my')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/calendar/calendar/my', name: 'chill_calendar_calendar_list_my')]
|
||||
public function myCalendar(Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_USER');
|
||||
@ -279,7 +279,7 @@ class CalendarController extends AbstractController
|
||||
/**
|
||||
* Create a new calendar item.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/calendar/calendar/new', name: 'chill_calendar_calendar_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/calendar/calendar/new', name: 'chill_calendar_calendar_new')]
|
||||
public function newAction(Request $request): Response
|
||||
{
|
||||
if (!$this->remoteCalendarConnector->isReady()) {
|
||||
@ -370,7 +370,7 @@ class CalendarController extends AbstractController
|
||||
'person' => $person,
|
||||
'accompanyingCourse' => $accompanyingPeriod,
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'entity_json' => $entity_array,
|
||||
'templates' => $templates,
|
||||
]);
|
||||
@ -379,7 +379,7 @@ class CalendarController extends AbstractController
|
||||
/**
|
||||
* Show a calendar item.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/calendar/calendar/{id}/show', name: 'chill_calendar_calendar_show')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/calendar/calendar/{id}/show', name: 'chill_calendar_calendar_show')]
|
||||
public function showAction(Request $request, int $id): Response
|
||||
{
|
||||
throw new \Exception('not implemented');
|
||||
@ -447,7 +447,7 @@ class CalendarController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/calendar/calendar/{id}/to-activity', name: 'chill_calendar_calendar_to_activity')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/calendar/calendar/{id}/to-activity', name: 'chill_calendar_calendar_to_activity')]
|
||||
public function toActivity(Request $request, Calendar $calendar): RedirectResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted(CalendarVoter::SEE, $calendar);
|
||||
|
@ -37,7 +37,7 @@ final readonly class CalendarDocController
|
||||
private UrlGeneratorInterface $urlGenerator,
|
||||
) {}
|
||||
|
||||
#[Route(path: '/{_locale}/calendar/calendar-doc/{id}/new', name: 'chill_calendar_calendardoc_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/calendar/calendar-doc/{id}/new', name: 'chill_calendar_calendardoc_new')]
|
||||
public function create(Calendar $calendar, Request $request): Response
|
||||
{
|
||||
$calendarDoc = (new CalendarDoc($calendar, null))->setCalendar($calendar);
|
||||
@ -94,7 +94,7 @@ final readonly class CalendarDocController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/calendar/calendar-doc/{id}/delete', name: 'chill_calendar_calendardoc_delete')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/calendar/calendar-doc/{id}/delete', name: 'chill_calendar_calendardoc_delete')]
|
||||
public function delete(CalendarDoc $calendarDoc, Request $request): Response
|
||||
{
|
||||
if (!$this->security->isGranted(CalendarDocVoter::EDIT, $calendarDoc)) {
|
||||
@ -152,7 +152,7 @@ final readonly class CalendarDocController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/calendar/calendar-doc/{id}/edit', name: 'chill_calendar_calendardoc_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/calendar/calendar-doc/{id}/edit', name: 'chill_calendar_calendardoc_edit')]
|
||||
public function edit(CalendarDoc $calendarDoc, Request $request): Response
|
||||
{
|
||||
if (!$this->security->isGranted(CalendarDocVoter::EDIT, $calendarDoc)) {
|
||||
|
@ -25,7 +25,7 @@ class CalendarRangeAPIController extends ApiController
|
||||
{
|
||||
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository) {}
|
||||
|
||||
#[Route(path: '/api/1.0/calendar/calendar-range-available/{id}.{_format}', name: 'chill_api_single_calendar_range_available', requirements: ['_format' => 'json'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/calendar/calendar-range-available/{id}.{_format}', name: 'chill_api_single_calendar_range_available', requirements: ['_format' => 'json'])]
|
||||
public function availableRanges(User $user, Request $request, string $_format): JsonResponse
|
||||
{
|
||||
// return new JsonResponse(['ok' => true], 200, [], false);
|
||||
|
@ -39,7 +39,7 @@ class InviteApiController
|
||||
/**
|
||||
* Give an answer to a calendar invite.
|
||||
*/
|
||||
#[Route(path: '/api/1.0/calendar/calendar/{id}/answer/{answer}.json', methods: ['post'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/calendar/calendar/{id}/answer/{answer}.json', methods: ['post'])]
|
||||
public function answer(Calendar $calendar, string $answer): Response
|
||||
{
|
||||
$user = $this->security->getUser();
|
||||
|
@ -32,7 +32,7 @@ class RemoteCalendarConnectAzureController
|
||||
{
|
||||
public function __construct(private readonly ClientRegistry $clientRegistry, private readonly OnBehalfOfUserTokenStorage $MSGraphTokenStorage) {}
|
||||
|
||||
#[Route(path: '/{_locale}/connect/azure', name: 'chill_calendar_remote_connect_azure')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/connect/azure', name: 'chill_calendar_remote_connect_azure')]
|
||||
public function connectAzure(Request $request): Response
|
||||
{
|
||||
$request->getSession()->set('azure_return_path', $request->query->get('returnPath', '/'));
|
||||
@ -42,7 +42,7 @@ class RemoteCalendarConnectAzureController
|
||||
->redirect(['https://graph.microsoft.com/.default', 'offline_access'], []);
|
||||
}
|
||||
|
||||
#[Route(path: '/connect/azure/check', name: 'chill_calendar_remote_connect_azure_check')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/connect/azure/check', name: 'chill_calendar_remote_connect_azure_check')]
|
||||
public function connectAzureCheck(Request $request): Response
|
||||
{
|
||||
/** @var Azure $client */
|
||||
|
@ -29,7 +29,7 @@ class RemoteCalendarMSGraphSyncController
|
||||
{
|
||||
public function __construct(private readonly MessageBusInterface $messageBus) {}
|
||||
|
||||
#[Route(path: '/public/incoming-hook/calendar/msgraph/events/{userId}', name: 'chill_calendar_remote_msgraph_incoming_webhook_events', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/public/incoming-hook/calendar/msgraph/events/{userId}', name: 'chill_calendar_remote_msgraph_incoming_webhook_events', methods: ['POST'])]
|
||||
public function webhookCalendarReceiver(int $userId, Request $request): Response
|
||||
{
|
||||
if ($request->query->has('validationToken')) {
|
||||
|
@ -36,7 +36,7 @@ class RemoteCalendarProxyController
|
||||
{
|
||||
public function __construct(private readonly PaginatorFactory $paginatorFactory, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly SerializerInterface $serializer) {}
|
||||
|
||||
#[Route(path: 'api/1.0/calendar/proxy/calendar/by-user/{id}/events')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: 'api/1.0/calendar/proxy/calendar/by-user/{id}/events')]
|
||||
public function listEventForCalendar(User $user, Request $request): Response
|
||||
{
|
||||
if (!$request->query->has('dateFrom')) {
|
||||
|
@ -137,7 +137,7 @@ class CalendarSyncer
|
||||
}
|
||||
|
||||
foreach ($calendar->getUsers() as $user) {
|
||||
if (!\in_array(strtolower($user->getEmailCanonical()), $emails, true)) {
|
||||
if (!\in_array(strtolower((string) $user->getEmailCanonical()), $emails, true)) {
|
||||
$calendar->removeUser($user);
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ final class RemoteCalendarMSGraphSyncControllerTest extends WebTestCase
|
||||
$this->assertResponseIsSuccessful();
|
||||
$this->assertResponseStatusCodeSame(202);
|
||||
|
||||
/** @var InMemoryTransport $transport */
|
||||
/** @var \Symfony\Component\Messenger\Transport\InMemory\InMemoryTransport $transport */
|
||||
$transport = self::getContainer()->get('messenger.transport.async');
|
||||
$this->assertCount(1, $transport->getSent());
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ use Symfony\Component\Routing\Annotation\Route;
|
||||
*/
|
||||
class AdminController extends AbstractController
|
||||
{
|
||||
#[Route(path: '/{_locale}/admin/customfield/', name: 'customfield_section')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/customfield/', name: 'customfield_section')]
|
||||
public function indexAction(): Response
|
||||
{
|
||||
return $this->render('@ChillCustomFields/Admin/layout.html.twig');
|
||||
|
@ -34,7 +34,7 @@ class CustomFieldController extends AbstractController
|
||||
/**
|
||||
* Creates a new CustomField entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/customfield/new', name: 'customfield_create')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/customfield/new', name: 'customfield_create')]
|
||||
public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$entity = new CustomField();
|
||||
@ -57,14 +57,14 @@ class CustomFieldController extends AbstractController
|
||||
|
||||
return $this->render('@ChillCustomFields/CustomField/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a form to edit an existing CustomField entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/customfield/edit', name: 'customfield_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/customfield/edit', name: 'customfield_edit')]
|
||||
public function editAction(mixed $id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -79,14 +79,14 @@ class CustomFieldController extends AbstractController
|
||||
|
||||
return $this->render('@ChillCustomFields/CustomField/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a form to create a new CustomField entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/customfield/new', name: 'customfield_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/customfield/new', name: 'customfield_new')]
|
||||
public function newAction(Request $request): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$entity = new CustomField();
|
||||
@ -109,14 +109,14 @@ class CustomFieldController extends AbstractController
|
||||
|
||||
return $this->render('@ChillCustomFields/CustomField/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Edits an existing CustomField entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/customfield/update', name: 'customfield_update')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/customfield/update', name: 'customfield_update')]
|
||||
public function updateAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -144,7 +144,7 @@ class CustomFieldController extends AbstractController
|
||||
|
||||
return $this->render('@ChillCustomFields/CustomField/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ class CustomFieldsGroupController extends AbstractController
|
||||
/**
|
||||
* Creates a new CustomFieldsGroup entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/customfieldsgroup/create', name: 'customfieldsgroup_create')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/customfieldsgroup/create', name: 'customfieldsgroup_create')]
|
||||
public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$entity = new CustomFieldsGroup();
|
||||
@ -68,14 +68,14 @@ class CustomFieldsGroupController extends AbstractController
|
||||
|
||||
return $this->render('@ChillCustomFields/CustomFieldsGroup/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a form to edit an existing CustomFieldsGroup entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/customfieldsgroup/{id}/edit', name: 'customfieldsgroup_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/customfieldsgroup/{id}/edit', name: 'customfieldsgroup_edit')]
|
||||
public function editAction(mixed $id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -90,14 +90,14 @@ class CustomFieldsGroupController extends AbstractController
|
||||
|
||||
return $this->render('@ChillCustomFields/CustomFieldsGroup/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all CustomFieldsGroup entities.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/customfieldsgroup/', name: 'customfieldsgroup')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/customfieldsgroup/', name: 'customfieldsgroup')]
|
||||
public function indexAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -123,7 +123,7 @@ class CustomFieldsGroupController extends AbstractController
|
||||
/**
|
||||
* Set the CustomField Group with id $cFGroupId as default.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/customfieldsgroup/makedefault', name: 'customfieldsgroup_makedefault')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/customfieldsgroup/makedefault', name: 'customfieldsgroup_makedefault')]
|
||||
public function makeDefaultAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
$form = $this->createMakeDefaultForm(null);
|
||||
@ -167,7 +167,7 @@ class CustomFieldsGroupController extends AbstractController
|
||||
/**
|
||||
* Displays a form to create a new CustomFieldsGroup entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/customfieldsgroup/new', name: 'customfieldsgroup_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/customfieldsgroup/new', name: 'customfieldsgroup_new')]
|
||||
public function newAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$entity = new CustomFieldsGroup();
|
||||
@ -175,7 +175,7 @@ class CustomFieldsGroupController extends AbstractController
|
||||
|
||||
return $this->render('@ChillCustomFields/CustomFieldsGroup/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -224,14 +224,14 @@ class CustomFieldsGroupController extends AbstractController
|
||||
|
||||
return $this
|
||||
->render('@test/CustomField/simple_form_render.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds and displays a CustomFieldsGroup entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/customfieldsgroup/{id}/show', name: 'customfieldsgroup_show')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/customfieldsgroup/{id}/show', name: 'customfieldsgroup_show')]
|
||||
public function showAction(mixed $id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -254,7 +254,7 @@ class CustomFieldsGroupController extends AbstractController
|
||||
/**
|
||||
* Edits an existing CustomFieldsGroup entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/customfieldsgroup/{id}/update', name: 'customfieldsgroup_update')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/customfieldsgroup/{id}/update', name: 'customfieldsgroup_update')]
|
||||
public function updateAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -282,7 +282,7 @@ class CustomFieldsGroupController extends AbstractController
|
||||
|
||||
return $this->render('@ChillCustomFields/CustomFieldsGroup/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ class AdminDocGeneratorTemplateController extends CRUDController
|
||||
return parent::new($request);
|
||||
}
|
||||
|
||||
#[Route(path: '{_locale}/admin/docgen/template/pick-context', name: 'chill_docgen_admin_template_pick-context')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/admin/docgen/template/pick-context', name: 'chill_docgen_admin_template_pick-context')]
|
||||
public function pickContext(Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_ADMIN');
|
||||
|
@ -51,7 +51,7 @@ final class DocGeneratorTemplateController extends AbstractController
|
||||
private readonly ChillSecurity $security,
|
||||
) {}
|
||||
|
||||
#[Route(path: '{_locale}/admin/doc/gen/generate/test/from/{template}/for/{entityClassName}/{entityId}', name: 'chill_docgenerator_test_generate_from_template')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/admin/doc/gen/generate/test/from/{template}/for/{entityClassName}/{entityId}', name: 'chill_docgenerator_test_generate_from_template')]
|
||||
public function adminTestGenerateDocFromTemplateAction(
|
||||
DocGeneratorTemplate $template,
|
||||
string $entityClassName,
|
||||
@ -66,7 +66,7 @@ final class DocGeneratorTemplateController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '{_locale}/doc/gen/generate/from/{template}/for/{entityClassName}/{entityId}', name: 'chill_docgenerator_generate_from_template')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/doc/gen/generate/from/{template}/for/{entityClassName}/{entityId}', name: 'chill_docgenerator_generate_from_template')]
|
||||
public function generateDocFromTemplateAction(
|
||||
DocGeneratorTemplate $template,
|
||||
string $entityClassName,
|
||||
@ -81,7 +81,7 @@ final class DocGeneratorTemplateController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/api/1.0/docgen/templates/by-entity/{entityClassName}', name: 'chill_docgenerator_templates_for_entity_api')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/docgen/templates/by-entity/{entityClassName}', name: 'chill_docgenerator_templates_for_entity_api')]
|
||||
public function listTemplateApiAction(string $entityClassName): Response
|
||||
{
|
||||
$nb = $this->docGeneratorTemplateRepository->countByEntity($entityClassName);
|
||||
@ -103,7 +103,7 @@ final class DocGeneratorTemplateController extends AbstractController
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
#[Route(path: '{_locale}/admin/doc/gen/generate/test/redirect', name: 'chill_docgenerator_test_generate_redirect')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/admin/doc/gen/generate/test/redirect', name: 'chill_docgenerator_test_generate_redirect')]
|
||||
public function redirectToTestGenerate(Request $request): RedirectResponse
|
||||
{
|
||||
$template = $request->query->getInt('template');
|
||||
|
@ -21,7 +21,7 @@ class AdminController extends AbstractController
|
||||
/**
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/document', name: 'chill_docstore_admin', options: [null])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/document', name: 'chill_docstore_admin', options: [null])]
|
||||
public function indexAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillDocStore/Admin/layout.html.twig');
|
||||
@ -30,7 +30,7 @@ class AdminController extends AbstractController
|
||||
/**
|
||||
* @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])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/document_redirect_to_main', name: 'chill_docstore_admin_redirect_to_admin_index', options: [null])]
|
||||
public function redirectToAdminIndexAction(): \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
return $this->redirectToRoute('chill_main_admin_central');
|
||||
|
@ -35,7 +35,7 @@ final readonly class AsyncUploadController
|
||||
private LoggerInterface $chillLogger,
|
||||
) {}
|
||||
|
||||
#[Route(path: '/api/1.0/doc-store/async-upload/temp_url/{uuid}/generate/post', name: 'chill_docstore_asyncupload_getsignedurlpost')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/doc-store/async-upload/temp_url/{uuid}/generate/post', name: 'chill_docstore_asyncupload_getsignedurlpost')]
|
||||
public function getSignedUrlPost(Request $request, StoredObject $storedObject): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted(StoredObjectRoleEnum::EDIT->value, $storedObject)) {
|
||||
@ -64,7 +64,7 @@ final readonly class AsyncUploadController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/api/1.0/doc-store/async-upload/temp_url/{uuid}/generate/{method}', name: 'chill_docstore_asyncupload_getsignedurlget', requirements: ['method' => 'get|head'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/doc-store/async-upload/temp_url/{uuid}/generate/{method}', name: 'chill_docstore_asyncupload_getsignedurlget', requirements: ['method' => 'get|head'])]
|
||||
public function getSignedUrlGet(Request $request, StoredObject $storedObject, string $method): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted(StoredObjectRoleEnum::SEE->value, $storedObject)) {
|
||||
|
@ -25,7 +25,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
#[Route(path: '/{_locale}/parcours/{course}/document')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/parcours/{course}/document')]
|
||||
class DocumentAccompanyingCourseController extends AbstractController
|
||||
{
|
||||
/**
|
||||
@ -38,7 +38,7 @@ class DocumentAccompanyingCourseController extends AbstractController
|
||||
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
|
||||
) {}
|
||||
|
||||
#[Route(path: '/{id}/delete', name: 'chill_docstore_accompanying_course_document_delete')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{id}/delete', name: 'chill_docstore_accompanying_course_document_delete')]
|
||||
public function delete(Request $request, AccompanyingPeriod $course, AccompanyingCourseDocument $document): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(AccompanyingCourseDocumentVoter::DELETE, $document);
|
||||
@ -65,13 +65,13 @@ class DocumentAccompanyingCourseController extends AbstractController
|
||||
'@ChillDocStore/AccompanyingCourseDocument/delete.html.twig',
|
||||
[
|
||||
'document' => $document,
|
||||
'delete_form' => $form->createView(),
|
||||
'delete_form' => $form,
|
||||
'accompanyingCourse' => $course,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/{id}/edit', name: 'accompanying_course_document_edit', methods: 'GET|POST')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{id}/edit', name: 'accompanying_course_document_edit', methods: 'GET|POST')]
|
||||
public function edit(Request $request, AccompanyingPeriod $course, AccompanyingCourseDocument $document): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(AccompanyingCourseDocumentVoter::UPDATE, $document);
|
||||
@ -104,13 +104,13 @@ class DocumentAccompanyingCourseController extends AbstractController
|
||||
'@ChillDocStore/AccompanyingCourseDocument/edit.html.twig',
|
||||
[
|
||||
'document' => $document,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'accompanyingCourse' => $course,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/new', name: 'accompanying_course_document_new', methods: 'GET|POST')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/new', name: 'accompanying_course_document_new', methods: 'GET|POST')]
|
||||
public function new(Request $request, AccompanyingPeriod $course): Response
|
||||
{
|
||||
if (null === $course) {
|
||||
@ -149,12 +149,12 @@ class DocumentAccompanyingCourseController extends AbstractController
|
||||
|
||||
return $this->render('@ChillDocStore/AccompanyingCourseDocument/new.html.twig', [
|
||||
'document' => $document,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'accompanyingCourse' => $course,
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/{id}', name: 'accompanying_course_document_show', methods: 'GET')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{id}', name: 'accompanying_course_document_show', methods: 'GET')]
|
||||
public function show(AccompanyingPeriod $course, AccompanyingCourseDocument $document): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(AccompanyingCourseDocumentVoter::SEE_DETAILS, $document);
|
||||
|
@ -33,7 +33,7 @@ final readonly class DocumentAccompanyingCourseDuplicateController
|
||||
private UrlGeneratorInterface $urlGenerator,
|
||||
) {}
|
||||
|
||||
#[Route('/{_locale}/doc-store/accompanying-course-document/{id}/duplicate', name: 'chill_doc_store_accompanying_course_document_duplicate')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/{_locale}/doc-store/accompanying-course-document/{id}/duplicate', name: 'chill_doc_store_accompanying_course_document_duplicate')]
|
||||
public function __invoke(AccompanyingCourseDocument $document, Request $request, Session $session): Response
|
||||
{
|
||||
if (!$this->security->isGranted(AccompanyingCourseDocumentVoter::SEE, $document)) {
|
||||
|
@ -20,12 +20,12 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
#[Route(path: '/{_locale}/admin/document/category')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/document/category')]
|
||||
class DocumentCategoryController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
|
||||
|
||||
#[Route(path: '/{bundleId}/{idInsideBundle}', name: 'document_category_delete', methods: 'DELETE')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{bundleId}/{idInsideBundle}', name: 'document_category_delete', methods: 'DELETE')]
|
||||
public function delete(Request $request, mixed $bundleId, mixed $idInsideBundle): Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -43,7 +43,7 @@ class DocumentCategoryController extends AbstractController
|
||||
return $this->redirectToRoute('document_category_index');
|
||||
}
|
||||
|
||||
#[Route(path: '/{bundleId}/{idInsideBundle}/edit', name: 'document_category_edit', methods: 'GET|POST')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{bundleId}/{idInsideBundle}/edit', name: 'document_category_edit', methods: 'GET|POST')]
|
||||
public function edit(Request $request, mixed $bundleId, mixed $idInsideBundle): Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -66,12 +66,12 @@ class DocumentCategoryController extends AbstractController
|
||||
|
||||
return $this->render('@ChillDocStore/DocumentCategory/edit.html.twig', [
|
||||
'document_category' => $documentCategory,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/', name: 'document_category_index', methods: 'GET')]
|
||||
#[Route(path: '/', name: 'chill_docstore_category_admin', methods: 'GET')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/', name: 'document_category_index', methods: 'GET')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/', name: 'chill_docstore_category_admin', methods: 'GET')]
|
||||
public function index(): Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -85,7 +85,7 @@ class DocumentCategoryController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/new', name: 'document_category_new', methods: 'GET|POST')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/new', name: 'document_category_new', methods: 'GET|POST')]
|
||||
public function new(Request $request): Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -118,11 +118,11 @@ class DocumentCategoryController extends AbstractController
|
||||
|
||||
return $this->render('@ChillDocStore/DocumentCategory/new.html.twig', [
|
||||
'document_category' => $documentCategory,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/{bundleId}/{idInsideBundle}', name: 'document_category_show', methods: 'GET')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{bundleId}/{idInsideBundle}', name: 'document_category_show', methods: 'GET')]
|
||||
public function show(mixed $bundleId, mixed $idInsideBundle): Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
@ -32,7 +32,7 @@ use Chill\DocStoreBundle\Service\StoredObjectManagerInterface;
|
||||
/**
|
||||
* Class DocumentPersonController.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/person/{person}/document')] // TODO faire un controller abstrait ?
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/person/{person}/document')] // TODO faire un controller abstrait ?
|
||||
class DocumentPersonController extends AbstractController
|
||||
{
|
||||
/**
|
||||
@ -47,7 +47,7 @@ class DocumentPersonController extends AbstractController
|
||||
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
|
||||
) {}
|
||||
|
||||
#[Route(path: '/{id}/delete', name: 'chill_docstore_person_document_delete')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{id}/delete', name: 'chill_docstore_person_document_delete')]
|
||||
public function delete(Request $request, Person $person, PersonDocument $document): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(PersonDocumentVoter::DELETE, $document);
|
||||
@ -74,13 +74,13 @@ class DocumentPersonController extends AbstractController
|
||||
'@ChillDocStore/PersonDocument/delete.html.twig',
|
||||
[
|
||||
'document' => $document,
|
||||
'delete_form' => $form->createView(),
|
||||
'delete_form' => $form,
|
||||
'person' => $person,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/{id}/edit', name: 'person_document_edit', methods: 'GET|POST')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{id}/edit', name: 'person_document_edit', methods: 'GET|POST')]
|
||||
public function edit(Request $request, Person $person, PersonDocument $document): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
|
||||
@ -131,13 +131,13 @@ class DocumentPersonController extends AbstractController
|
||||
'@ChillDocStore/PersonDocument/edit.html.twig',
|
||||
[
|
||||
'document' => $document,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'person' => $person,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/new', name: 'person_document_new', methods: 'GET|POST')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/new', name: 'person_document_new', methods: 'GET|POST')]
|
||||
public function new(Request $request, Person $person): Response
|
||||
{
|
||||
if (null === $person) {
|
||||
@ -178,12 +178,12 @@ class DocumentPersonController extends AbstractController
|
||||
|
||||
return $this->render('@ChillDocStore/PersonDocument/new.html.twig', [
|
||||
'document' => $document,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'person' => $person,
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/{id}', name: 'person_document_show', methods: 'GET')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{id}', name: 'person_document_show', methods: 'GET')]
|
||||
public function show(Person $person, PersonDocument $document): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person);
|
||||
|
@ -34,7 +34,7 @@ final readonly class GenericDocForAccompanyingPeriodController
|
||||
/**
|
||||
* @throws \Doctrine\DBAL\Exception
|
||||
*/
|
||||
#[Route(path: '/{_locale}/doc-store/generic-doc/by-period/{id}/index', name: 'chill_docstore_generic-doc_by-period_index')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/doc-store/generic-doc/by-period/{id}/index', name: 'chill_docstore_generic-doc_by-period_index')]
|
||||
public function list(AccompanyingPeriod $accompanyingPeriod): Response
|
||||
{
|
||||
if (!$this->security->isGranted(AccompanyingCourseDocumentVoter::SEE, $accompanyingPeriod)) {
|
||||
|
@ -35,7 +35,7 @@ final readonly class GenericDocForAccompanyingPeriodListApiController
|
||||
private SerializerInterface $serializer,
|
||||
) {}
|
||||
|
||||
#[Route('/api/1.0/doc-store/generic-doc/by-period/{id}/index', methods: ['GET'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/api/1.0/doc-store/generic-doc/by-period/{id}/index', methods: ['GET'])]
|
||||
public function __invoke(AccompanyingPeriod $accompanyingPeriod): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted(AccompanyingCourseDocumentVoter::SEE, $accompanyingPeriod)) {
|
||||
|
@ -34,7 +34,7 @@ final readonly class GenericDocForPerson
|
||||
/**
|
||||
* @throws \Doctrine\DBAL\Exception
|
||||
*/
|
||||
#[Route(path: '/{_locale}/doc-store/generic-doc/by-person/{id}/index', name: 'chill_docstore_generic-doc_by-person_index')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/doc-store/generic-doc/by-person/{id}/index', name: 'chill_docstore_generic-doc_by-person_index')]
|
||||
public function list(Person $person): Response
|
||||
{
|
||||
if (!$this->security->isGranted(PersonDocumentVoter::SEE, $person)) {
|
||||
|
@ -45,7 +45,7 @@ class SignatureRequestController
|
||||
private readonly EntityManagerInterface $entityManager,
|
||||
) {}
|
||||
|
||||
#[Route('/api/1.0/document/workflow/{id}/signature-request', name: 'chill_docstore_signature_request')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/api/1.0/document/workflow/{id}/signature-request', name: 'chill_docstore_signature_request')]
|
||||
public function processSignature(EntityWorkflowStepSignature $signature, Request $request): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted(EntityWorkflowStepSignatureVoter::SIGN, $signature)) {
|
||||
@ -96,7 +96,7 @@ class SignatureRequestController
|
||||
return new JsonResponse(null, JsonResponse::HTTP_OK, []);
|
||||
}
|
||||
|
||||
#[Route('/api/1.0/document/workflow/{id}/check-signature', name: 'chill_docstore_check_signature')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/api/1.0/document/workflow/{id}/check-signature', name: 'chill_docstore_check_signature')]
|
||||
public function checkSignature(EntityWorkflowStepSignature $signature): JsonResponse
|
||||
{
|
||||
$entityWorkflow = $signature->getStep()->getEntityWorkflow();
|
||||
|
@ -40,7 +40,7 @@ class StoredObjectApiController extends ApiController
|
||||
*
|
||||
* @throws AccessDeniedHttpException if the user does not have the necessary role to create a stored object
|
||||
*/
|
||||
#[Route('/api/1.0/doc-store/stored-object/create', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/api/1.0/doc-store/stored-object/create', methods: ['POST'])]
|
||||
public function createStoredObject(): JsonResponse
|
||||
{
|
||||
if (!($this->security->isGranted('ROLE_ADMIN') || $this->security->isGranted('ROLE_USER'))) {
|
||||
|
@ -31,7 +31,7 @@ final readonly class StoredObjectContentToLocalStorageController
|
||||
private TempUrlLocalStorageGenerator $tempUrlLocalStorageGenerator,
|
||||
) {}
|
||||
|
||||
#[Route('/public/stored-object/post', name: 'chill_docstore_storedobject_post', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/public/stored-object/post', name: 'chill_docstore_storedobject_post', methods: ['POST'])]
|
||||
public function postContent(Request $request): Response
|
||||
{
|
||||
$prefix = $request->query->get('prefix', '');
|
||||
@ -88,7 +88,7 @@ final readonly class StoredObjectContentToLocalStorageController
|
||||
return new Response(status: Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
#[Route('/public/stored-object/operate', name: 'chill_docstore_stored_object_operate', methods: ['GET', 'HEAD'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/public/stored-object/operate', name: 'chill_docstore_stored_object_operate', methods: ['GET', 'HEAD'])]
|
||||
public function contentOperate(Request $request): Response
|
||||
{
|
||||
if ('' === $objectName = $request->query->get('object_name', '')) {
|
||||
|
@ -27,7 +27,7 @@ final readonly class StoredObjectRestoreVersionApiController
|
||||
{
|
||||
public function __construct(private Security $security, private StoredObjectRestoreInterface $storedObjectRestore, private EntityManagerInterface $entityManager, private SerializerInterface $serializer) {}
|
||||
|
||||
#[Route('/api/1.0/doc-store/stored-object/restore-from-version/{id}', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/api/1.0/doc-store/stored-object/restore-from-version/{id}', methods: ['POST'])]
|
||||
public function restoreStoredObjectVersion(StoredObjectVersion $storedObjectVersion): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted(StoredObjectRoleEnum::EDIT->value, $storedObjectVersion->getStoredObject())) {
|
||||
|
@ -22,7 +22,7 @@ class StoredObjectStatusApiController
|
||||
{
|
||||
public function __construct(private readonly Security $security) {}
|
||||
|
||||
#[Route(path: '/api/1.0/doc-store/stored-object/{uuid}/is-ready')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/doc-store/stored-object/{uuid}/is-ready')]
|
||||
public function isDocumentReady(StoredObject $storedObject): Response
|
||||
{
|
||||
if (!$this->security->isGranted('ROLE_USER')) {
|
||||
|
@ -42,7 +42,7 @@ final readonly class StoredObjectVersionApiController
|
||||
*
|
||||
* @throws AccessDeniedHttpException if the user is not allowed to see the stored object
|
||||
*/
|
||||
#[Route('/api/1.0/doc-store/stored-object/{uuid}/versions', name: 'chill_doc_store_stored_object_versions_list')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/api/1.0/doc-store/stored-object/{uuid}/versions', name: 'chill_doc_store_stored_object_versions_list')]
|
||||
public function listVersions(StoredObject $storedObject): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted(StoredObjectRoleEnum::SEE->value, $storedObject)) {
|
||||
|
@ -48,7 +48,7 @@ final readonly class WebdavController
|
||||
$this->requestAnalyzer = new PropfindRequestAnalyzer();
|
||||
}
|
||||
|
||||
#[Route(path: '/dav/{access_token}/get/{uuid}/', methods: ['GET', 'HEAD'], name: 'chill_docstore_dav_directory_get')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/dav/{access_token}/get/{uuid}/', methods: ['GET', 'HEAD'], name: 'chill_docstore_dav_directory_get')]
|
||||
public function getDirectory(StoredObject $storedObject, string $access_token): Response
|
||||
{
|
||||
if (!$this->security->isGranted(StoredObjectRoleEnum::SEE->value, $storedObject)) {
|
||||
@ -63,7 +63,7 @@ final readonly class WebdavController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/dav/{access_token}/get/{uuid}/', methods: ['OPTIONS'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/dav/{access_token}/get/{uuid}/', methods: ['OPTIONS'])]
|
||||
public function optionsDirectory(StoredObject $storedObject): Response
|
||||
{
|
||||
if (!$this->security->isGranted(StoredObjectRoleEnum::SEE->value, $storedObject)) {
|
||||
@ -80,7 +80,7 @@ final readonly class WebdavController
|
||||
return $response;
|
||||
}
|
||||
|
||||
#[Route(path: '/dav/{access_token}/get/{uuid}/', methods: ['PROPFIND'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/dav/{access_token}/get/{uuid}/', methods: ['PROPFIND'])]
|
||||
public function propfindDirectory(StoredObject $storedObject, string $access_token, Request $request): Response
|
||||
{
|
||||
if (!$this->security->isGranted(StoredObjectRoleEnum::SEE->value, $storedObject)) {
|
||||
@ -115,7 +115,7 @@ final readonly class WebdavController
|
||||
return $response;
|
||||
}
|
||||
|
||||
#[Route(path: '/dav/{access_token}/get/{uuid}/d', name: 'chill_docstore_dav_document_get', methods: ['GET'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/dav/{access_token}/get/{uuid}/d', name: 'chill_docstore_dav_document_get', methods: ['GET'])]
|
||||
public function getDocument(StoredObject $storedObject): Response
|
||||
{
|
||||
if (!$this->security->isGranted(StoredObjectRoleEnum::SEE->value, $storedObject)) {
|
||||
@ -126,7 +126,7 @@ final readonly class WebdavController
|
||||
->setEtag($this->storedObjectManager->etag($storedObject));
|
||||
}
|
||||
|
||||
#[Route(path: '/dav/{access_token}/get/{uuid}/d', methods: ['HEAD'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/dav/{access_token}/get/{uuid}/d', methods: ['HEAD'])]
|
||||
public function headDocument(StoredObject $storedObject): Response
|
||||
{
|
||||
if (!$this->security->isGranted(StoredObjectRoleEnum::SEE->value, $storedObject)) {
|
||||
@ -146,7 +146,7 @@ final readonly class WebdavController
|
||||
return $response;
|
||||
}
|
||||
|
||||
#[Route(path: '/dav/{access_token}/get/{uuid}/d', methods: ['OPTIONS'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/dav/{access_token}/get/{uuid}/d', methods: ['OPTIONS'])]
|
||||
public function optionsDocument(StoredObject $storedObject): Response
|
||||
{
|
||||
if (!$this->security->isGranted(StoredObjectRoleEnum::SEE->value, $storedObject)) {
|
||||
@ -162,7 +162,7 @@ final readonly class WebdavController
|
||||
return $response;
|
||||
}
|
||||
|
||||
#[Route(path: '/dav/{access_token}/get/{uuid}/d', methods: ['PROPFIND'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/dav/{access_token}/get/{uuid}/d', methods: ['PROPFIND'])]
|
||||
public function propfindDocument(StoredObject $storedObject, string $access_token, Request $request): Response
|
||||
{
|
||||
if (!$this->security->isGranted(StoredObjectRoleEnum::SEE->value, $storedObject)) {
|
||||
@ -194,7 +194,7 @@ final readonly class WebdavController
|
||||
return $response;
|
||||
}
|
||||
|
||||
#[Route(path: '/dav/{access_token}/get/{uuid}/d', methods: ['PUT'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/dav/{access_token}/get/{uuid}/d', methods: ['PUT'])]
|
||||
public function putDocument(StoredObject $storedObject, Request $request): Response
|
||||
{
|
||||
if (!$this->security->isGranted(StoredObjectRoleEnum::EDIT->value, $storedObject)) {
|
||||
|
@ -23,7 +23,7 @@ class AdminController extends AbstractController
|
||||
/**
|
||||
* Event admin.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event', name: 'chill_event_admin_index')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event', name: 'chill_event_admin_index')]
|
||||
public function indexAdminAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillEvent/Admin/index.html.twig');
|
||||
|
@ -61,7 +61,7 @@ final class EventController extends AbstractController
|
||||
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
|
||||
) {}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/delete', name: 'chill_event__event_delete', requirements: ['event_id' => '\d+'], methods: ['GET', 'POST', 'DELETE'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/event/event/{event_id}/delete', name: 'chill_event__event_delete', requirements: ['event_id' => '\d+'], methods: ['GET', 'POST', 'DELETE'])]
|
||||
public function deleteAction($event_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -104,7 +104,7 @@ final class EventController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/Event/confirm_delete.html.twig', [
|
||||
'event_id' => $event->getId(),
|
||||
'delete_form' => $form->createView(),
|
||||
'delete_form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ final class EventController extends AbstractController
|
||||
*
|
||||
* @throws \Doctrine\ORM\NonUniqueResultException
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{person_id}/list', name: 'chill_event__list_by_person', methods: ['GET'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/event/event/{person_id}/list', name: 'chill_event__list_by_person', methods: ['GET'])]
|
||||
public function listByPersonAction($person_id): Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -155,11 +155,11 @@ final class EventController extends AbstractController
|
||||
'participations' => $participations,
|
||||
'person' => $person,
|
||||
'paginator' => $paginator,
|
||||
'form_add_event_participation_by_person' => $addEventParticipationByPersonForm->createView(),
|
||||
'form_add_event_participation_by_person' => $addEventParticipationByPersonForm,
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/most_recent', name: 'chill_event_list_most_recent', options: [null])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/event/event/most_recent', name: 'chill_event_list_most_recent', options: [null])]
|
||||
public function mostRecentIndexAction(): \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
return $this->redirectToRoute('chill_main_search', [
|
||||
@ -170,7 +170,7 @@ final class EventController extends AbstractController
|
||||
/**
|
||||
* Displays a form to create a new Event entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/new', name: 'chill_event__event_new', methods: ['GET', 'POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/event/event/new', name: 'chill_event__event_new', methods: ['GET', 'POST'])]
|
||||
public function newAction(?Center $center, Request $request): Response
|
||||
{
|
||||
$user = $this->security->getUser();
|
||||
@ -204,14 +204,14 @@ final class EventController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/Event/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $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])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/event/event/new/pick-center', name: 'chill_event__event_new_pickcenter', options: [null])]
|
||||
public function newPickCenterAction(): Response
|
||||
{
|
||||
$role = 'CHILL_EVENT_CREATE';
|
||||
@ -247,7 +247,7 @@ final class EventController extends AbstractController
|
||||
->getForm();
|
||||
|
||||
return $this->render('@ChillEvent/Event/newPickCenter.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -260,7 +260,7 @@ final class EventController extends AbstractController
|
||||
*
|
||||
* @throws \PhpOffice\PhpSpreadsheet\Exception
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/show', name: 'chill_event__event_show')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/event/event/{event_id}/show', name: 'chill_event__event_show')]
|
||||
public function showAction(Event $event, Request $request)
|
||||
{
|
||||
if (!$event) {
|
||||
@ -283,7 +283,7 @@ final class EventController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/Event/show.html.twig', [
|
||||
'event' => $event,
|
||||
'form_add_participation_by_person' => $addParticipationByPersonForm->createView(),
|
||||
'form_add_participation_by_person' => $addParticipationByPersonForm,
|
||||
'form_export' => $exportParticipationsList['form']->createView(),
|
||||
]);
|
||||
}
|
||||
@ -291,7 +291,7 @@ final class EventController extends AbstractController
|
||||
/**
|
||||
* Edits an existing Event entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/edit', name: 'chill_event__event_edit', methods: ['GET', 'POST', 'PUT'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/event/event/{event_id}/edit', name: 'chill_event__event_edit', methods: ['GET', 'POST', 'PUT'])]
|
||||
public function updateAction(Request $request, $event_id): \Symfony\Component\HttpFoundation\RedirectResponse|Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -322,7 +322,7 @@ final class EventController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/Event/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ final readonly class EventListController
|
||||
private UrlGeneratorInterface $urlGenerator,
|
||||
) {}
|
||||
|
||||
#[Route(path: '{_locale}/event/event/list', name: 'chill_event_event_list')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/event/event/list', name: 'chill_event_event_list')]
|
||||
public function __invoke(): Response
|
||||
{
|
||||
$filter = $this->buildFilterOrder();
|
||||
|
@ -28,7 +28,7 @@ class EventTypeController extends AbstractController
|
||||
/**
|
||||
* Creates a new EventType entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/event_type/create', name: 'chill_eventtype_admin_create', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/event_type/create', name: 'chill_eventtype_admin_create', methods: ['POST'])]
|
||||
public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$entity = new EventType();
|
||||
@ -45,14 +45,14 @@ class EventTypeController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/EventType/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a EventType entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/event_type/{id}/delete', name: 'chill_eventtype_admin_delete', methods: ['POST', 'DELETE'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/event_type/{id}/delete', name: 'chill_eventtype_admin_delete', methods: ['POST', 'DELETE'])]
|
||||
public function deleteAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
$form = $this->createDeleteForm($id);
|
||||
@ -76,7 +76,7 @@ class EventTypeController extends AbstractController
|
||||
/**
|
||||
* Displays a form to edit an existing EventType entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/event_type/{id}/edit', name: 'chill_eventtype_admin_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/event_type/{id}/edit', name: 'chill_eventtype_admin_edit')]
|
||||
public function editAction(mixed $id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -92,15 +92,15 @@ class EventTypeController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/EventType/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'delete_form' => $deleteForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
'delete_form' => $deleteForm,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all EventType entities.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/event_type/', name: 'chill_eventtype_admin', options: [null])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/event_type/', name: 'chill_eventtype_admin', options: [null])]
|
||||
public function indexAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -115,7 +115,7 @@ class EventTypeController extends AbstractController
|
||||
/**
|
||||
* Displays a form to create a new EventType entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/event_type/new', name: 'chill_eventtype_admin_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/event_type/new', name: 'chill_eventtype_admin_new')]
|
||||
public function newAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$entity = new EventType();
|
||||
@ -123,14 +123,14 @@ class EventTypeController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/EventType/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds and displays a EventType entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/event_type/{id}/show', name: 'chill_eventtype_admin_show')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/event_type/{id}/show', name: 'chill_eventtype_admin_show')]
|
||||
public function showAction(mixed $id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -145,14 +145,14 @@ class EventTypeController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/EventType/show.html.twig', [
|
||||
'entity' => $entity,
|
||||
'delete_form' => $deleteForm->createView(),
|
||||
'delete_form' => $deleteForm,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Edits an existing EventType entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/event_type/{id}/update', name: 'chill_eventtype_admin_update', methods: ['POST', 'PUT'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/event_type/{id}/update', name: 'chill_eventtype_admin_update', methods: ['POST', 'PUT'])]
|
||||
public function updateAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -175,8 +175,8 @@ class EventTypeController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/EventType/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'delete_form' => $deleteForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
'delete_form' => $deleteForm,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ final class ParticipationController extends AbstractController
|
||||
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
|
||||
) {}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/participation/create', name: 'chill_event_participation_create')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/event/participation/create', name: 'chill_event_participation_create')]
|
||||
public function createAction(Request $request): Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
// test the request is correct
|
||||
@ -195,7 +195,7 @@ final class ParticipationController extends AbstractController
|
||||
}
|
||||
|
||||
return $this->render('@ChillEvent/Participation/new.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'participation' => $participation,
|
||||
]);
|
||||
}
|
||||
@ -233,7 +233,7 @@ final class ParticipationController extends AbstractController
|
||||
}
|
||||
|
||||
return $this->render('@ChillEvent/Participation/new.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'participation' => $participation,
|
||||
'ignored_participations' => [],
|
||||
]);
|
||||
@ -242,7 +242,7 @@ final class ParticipationController extends AbstractController
|
||||
/**
|
||||
* @param int $participation_id
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/participation/{participation_id}/delete', name: 'chill_event_participation_delete', requirements: ['participation_id' => '\d+'], methods: ['GET', 'DELETE'])]
|
||||
#[\Symfony\Component\Routing\Attribute\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): Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -280,7 +280,7 @@ final class ParticipationController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/Participation/confirm_delete.html.twig', [
|
||||
'event_id' => $event->getId(),
|
||||
'delete_form' => $form->createView(),
|
||||
'delete_form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@ final class ParticipationController extends AbstractController
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException if the participation is not found
|
||||
* @throws \Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException if the user is not allowed to edit the participation
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/participation/{participation_id}/edit', name: 'chill_event_participation_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/event/participation/{participation_id}/edit', name: 'chill_event_participation_edit')]
|
||||
public function editAction(int $participation_id): Response
|
||||
{
|
||||
/** @var Participation $participation */
|
||||
@ -311,7 +311,7 @@ final class ParticipationController extends AbstractController
|
||||
$form = $this->createEditForm($participation);
|
||||
|
||||
return $this->render('@ChillEvent/Participation/edit.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'participation' => $participation,
|
||||
]);
|
||||
}
|
||||
@ -321,7 +321,7 @@ final class ParticipationController extends AbstractController
|
||||
*
|
||||
* @param int $event_id
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/participation/{event_id}/edit_multiple', name: 'chill_event_participation_edit_multiple')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/event/participation/{event_id}/edit_multiple', name: 'chill_event_participation_edit_multiple')]
|
||||
public function editMultipleAction($event_id): Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
$event = $this->managerRegistry->getRepository(Event::class)
|
||||
@ -366,7 +366,7 @@ final class ParticipationController extends AbstractController
|
||||
return $this->render('@ChillEvent/Participation/edit-multiple.html.twig', [
|
||||
'event' => $event,
|
||||
'participations' => $event->getParticipations(),
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -377,7 +377,7 @@ final class ParticipationController extends AbstractController
|
||||
* and decide if it should process a single or multiple participation. Depending
|
||||
* on this, the appropriate layout and form.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/participation/new', name: 'chill_event_participation_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/event/participation/new', name: 'chill_event_participation_new')]
|
||||
public function newAction(Request $request): Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
// test the request is correct
|
||||
@ -410,7 +410,7 @@ final class ParticipationController extends AbstractController
|
||||
."'persons_ids' argument in query");
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/participation/{participation_id}/update', name: 'chill_event_participation_update', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/event/participation/{participation_id}/update', name: 'chill_event_participation_update', methods: ['POST'])]
|
||||
public function updateAction(int $participation_id, Request $request): Response
|
||||
{
|
||||
/** @var Participation $participation */
|
||||
@ -447,12 +447,12 @@ final class ParticipationController extends AbstractController
|
||||
}
|
||||
|
||||
return $this->render('@ChillEvent/Participation/edit.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'participation' => $participation,
|
||||
]);
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/participation/{event_id}/update_multiple', name: 'chill_event_participation_update_multiple', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/event/participation/{event_id}/update_multiple', name: 'chill_event_participation_update_multiple', methods: ['POST'])]
|
||||
public function updateMultipleAction(mixed $event_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
/** @var Event $event */
|
||||
@ -493,7 +493,7 @@ final class ParticipationController extends AbstractController
|
||||
return $this->render('@ChillEvent/Participation/edit-multiple.html.twig', [
|
||||
'event' => $event,
|
||||
'participations' => $event->getParticipations(),
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -664,7 +664,7 @@ final class ParticipationController extends AbstractController
|
||||
return $this->render(
|
||||
'@ChillEvent/Participation/new-multiple.html.twig',
|
||||
[
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'participations' => $newParticipations,
|
||||
'ignored_participations' => $ignoredParticipations,
|
||||
]
|
||||
@ -677,7 +677,7 @@ final class ParticipationController extends AbstractController
|
||||
return $this->render(
|
||||
'@ChillEvent/Participation/new.html.twig',
|
||||
[
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'participation' => $participation,
|
||||
'ignored_participations' => $ignoredParticipations,
|
||||
]
|
||||
@ -705,7 +705,7 @@ final class ParticipationController extends AbstractController
|
||||
$form = $this->createCreateForm($participation, $returnPath);
|
||||
|
||||
return $this->render('@ChillEvent/Participation/new.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'participation' => $participation,
|
||||
'ignored_participations' => [], // this is required, see self::newMultiple
|
||||
]);
|
||||
|
@ -28,7 +28,7 @@ class RoleController extends AbstractController
|
||||
/**
|
||||
* Creates a new Role entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/role/create', name: 'chill_event_admin_role_create', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/role/create', name: 'chill_event_admin_role_create', methods: ['POST'])]
|
||||
public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$entity = new Role();
|
||||
@ -45,14 +45,14 @@ class RoleController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/Role/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Role entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/role/{id}/delete', name: 'chill_event_admin_role_delete', methods: ['POST', 'DELETE'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/role/{id}/delete', name: 'chill_event_admin_role_delete', methods: ['POST', 'DELETE'])]
|
||||
public function deleteAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
$form = $this->createDeleteForm($id);
|
||||
@ -76,7 +76,7 @@ class RoleController extends AbstractController
|
||||
/**
|
||||
* Displays a form to edit an existing Role entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/role/{id}/edit', name: 'chill_event_admin_role_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/role/{id}/edit', name: 'chill_event_admin_role_edit')]
|
||||
public function editAction(mixed $id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -92,15 +92,15 @@ class RoleController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/Role/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'delete_form' => $deleteForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
'delete_form' => $deleteForm,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Role entities.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/role/', name: 'chill_event_admin_role', options: [null])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/role/', name: 'chill_event_admin_role', options: [null])]
|
||||
public function indexAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -115,7 +115,7 @@ class RoleController extends AbstractController
|
||||
/**
|
||||
* Displays a form to create a new Role entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/role/new', name: 'chill_event_admin_role_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/role/new', name: 'chill_event_admin_role_new')]
|
||||
public function newAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$entity = new Role();
|
||||
@ -123,14 +123,14 @@ class RoleController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/Role/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds and displays a Role entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/role/{id}/show', name: 'chill_event_admin_role_show')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/role/{id}/show', name: 'chill_event_admin_role_show')]
|
||||
public function showAction(mixed $id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -145,14 +145,14 @@ class RoleController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/Role/show.html.twig', [
|
||||
'entity' => $entity,
|
||||
'delete_form' => $deleteForm->createView(),
|
||||
'delete_form' => $deleteForm,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Edits an existing Role entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/role/{id}/update', name: 'chill_event_admin_role_update', methods: ['POST', 'PUT'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/role/{id}/update', name: 'chill_event_admin_role_update', methods: ['POST', 'PUT'])]
|
||||
public function updateAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -175,8 +175,8 @@ class RoleController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/Role/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'delete_form' => $deleteForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
'delete_form' => $deleteForm,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ class StatusController extends AbstractController
|
||||
/**
|
||||
* Creates a new Status entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/status/create', name: 'chill_event_admin_status_create', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/status/create', name: 'chill_event_admin_status_create', methods: ['POST'])]
|
||||
public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$entity = new Status();
|
||||
@ -45,14 +45,14 @@ class StatusController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/Status/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Status entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/status/{id}/delete', name: 'chill_event_admin_status_delete', methods: ['POST', 'DELETE'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/status/{id}/delete', name: 'chill_event_admin_status_delete', methods: ['POST', 'DELETE'])]
|
||||
public function deleteAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
$form = $this->createDeleteForm($id);
|
||||
@ -76,7 +76,7 @@ class StatusController extends AbstractController
|
||||
/**
|
||||
* Displays a form to edit an existing Status entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/status/{id}/edit', name: 'chill_event_admin_status_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/status/{id}/edit', name: 'chill_event_admin_status_edit')]
|
||||
public function editAction(mixed $id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -92,15 +92,15 @@ class StatusController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/Status/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'delete_form' => $deleteForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
'delete_form' => $deleteForm,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Status entities.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/status/', name: 'chill_event_admin_status', options: [null])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/status/', name: 'chill_event_admin_status', options: [null])]
|
||||
public function indexAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -115,7 +115,7 @@ class StatusController extends AbstractController
|
||||
/**
|
||||
* Displays a form to create a new Status entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/status/new', name: 'chill_event_admin_status_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/status/new', name: 'chill_event_admin_status_new')]
|
||||
public function newAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$entity = new Status();
|
||||
@ -123,14 +123,14 @@ class StatusController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/Status/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds and displays a Status entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/status/{id}/show', name: 'chill_event_admin_status_show')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/status/{id}/show', name: 'chill_event_admin_status_show')]
|
||||
public function showAction(mixed $id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -145,14 +145,14 @@ class StatusController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/Status/show.html.twig', [
|
||||
'entity' => $entity,
|
||||
'delete_form' => $deleteForm->createView(),
|
||||
'delete_form' => $deleteForm,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Edits an existing Status entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/event/status/{id}/update', name: 'chill_event_admin_status_update', methods: ['POST', 'PUT'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/event/status/{id}/update', name: 'chill_event_admin_status_update', methods: ['POST', 'PUT'])]
|
||||
public function updateAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -175,8 +175,8 @@ class StatusController extends AbstractController
|
||||
|
||||
return $this->render('@ChillEvent/Status/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'delete_form' => $deleteForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
'delete_form' => $deleteForm,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ class TimelineEventProvider implements TimelineProviderInterface
|
||||
*
|
||||
* @throws \Doctrine\ORM\Mapping\MappingException
|
||||
*/
|
||||
public function fetchQuery($context, array $args)
|
||||
public function fetchQuery($context, array $args): \Chill\MainBundle\Timeline\TimelineSingleQuery
|
||||
{
|
||||
$this->checkContext($context);
|
||||
|
||||
|
@ -29,7 +29,7 @@ class RomeController extends AbstractController
|
||||
$this->apiAppellation = $apiAppellation;
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/france-travail/appellation/search.{_format}', name: 'chill_france_travail_api_appellation_search')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/france-travail/appellation/search.{_format}', name: 'chill_france_travail_api_appellation_search')]
|
||||
public function appellationSearchAction(Request $request)
|
||||
{
|
||||
if (false === $request->query->has('q')) {
|
||||
|
@ -22,7 +22,7 @@ use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class CSPersonController extends OneToOneEntityPersonCRUDController
|
||||
{
|
||||
#[Route(path: '{_locale}/person/job/personal_situation/{id}/edit', name: 'chill_crud_job_personal_situation_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/person/job/personal_situation/{id}/edit', name: 'chill_crud_job_personal_situation_edit')]
|
||||
public function personalSituationEdit(Request $request, $id): Response
|
||||
{
|
||||
return $this->formEditAction(
|
||||
@ -33,7 +33,7 @@ class CSPersonController extends OneToOneEntityPersonCRUDController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '{_locale}/person/job/dispositifs/{id}/edit', name: 'chill_crud_job_dispositifs_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/person/job/dispositifs/{id}/edit', name: 'chill_crud_job_dispositifs_edit')]
|
||||
public function dispositifsEdit(Request $request, $id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->formEditAction(
|
||||
@ -44,13 +44,13 @@ class CSPersonController extends OneToOneEntityPersonCRUDController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '{_locale}/person/job/{person}/personal_situation', name: 'chill_crud_job_personal_situation_view')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/person/job/{person}/personal_situation', name: 'chill_crud_job_personal_situation_view')]
|
||||
public function personalSituationView(Request $request, $person): Response
|
||||
{
|
||||
return $this->viewAction('ps_situation_view', $request, $person);
|
||||
}
|
||||
|
||||
#[Route(path: '{_locale}/person/job/{person}/dispositifs', name: 'chill_crud_job_dispositifs_view')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/person/job/{person}/dispositifs', name: 'chill_crud_job_dispositifs_view')]
|
||||
public function dispositifsView(Request $request, $person): Response
|
||||
{
|
||||
return $this->viewAction('dispositifs_view', $request, $person);
|
||||
|
@ -26,7 +26,7 @@ class CSReportController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
|
||||
|
||||
#[Route(path: '{_locale}/person/job/{person}/report', name: 'chill_job_report_index')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/person/job/{person}/report', name: 'chill_job_report_index')]
|
||||
public function index(Person $person): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(PersonVoter::SEE, $person, 'The access to '
|
||||
|
@ -39,14 +39,8 @@ abstract class AbstractCRUDController extends AbstractController
|
||||
*/
|
||||
protected array $crudConfig = [];
|
||||
|
||||
protected readonly SerializerInterface $serializer;
|
||||
|
||||
protected readonly ManagerRegistry $managerRegistry;
|
||||
|
||||
public function __construct(SerializerInterface $serializer, ManagerRegistry $managerRegistry)
|
||||
public function __construct(protected readonly SerializerInterface $serializer, protected readonly ManagerRegistry $managerRegistry)
|
||||
{
|
||||
$this->serializer = $serializer;
|
||||
$this->managerRegistry = $managerRegistry;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -66,7 +66,7 @@ class TwigCRUDResolver extends AbstractExtension
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasAction($crudName, $action)
|
||||
public function hasAction($crudName, $action): bool
|
||||
{
|
||||
return $this->resolver->hasAction($crudName, $action);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ class AbsenceController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly ChillSecurity $security, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
|
||||
|
||||
#[Route(path: '/{_locale}/absence', name: 'chill_main_user_absence_index', methods: ['GET', 'POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/absence', name: 'chill_main_user_absence_index', methods: ['GET', 'POST'])]
|
||||
public function setAbsence(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$user = $this->security->getUser();
|
||||
@ -38,11 +38,11 @@ class AbsenceController extends AbstractController
|
||||
|
||||
return $this->render('@ChillMain/Menu/absence.html.twig', [
|
||||
'user' => $user,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/absence/unset', name: 'chill_main_user_absence_unset', methods: ['GET', 'POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/absence/unset', name: 'chill_main_user_absence_unset', methods: ['GET', 'POST'])]
|
||||
public function unsetAbsence(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
$user = $this->security->getUser();
|
||||
|
@ -33,7 +33,7 @@ class AddressApiController extends ApiController
|
||||
/**
|
||||
* Duplicate an existing address.
|
||||
*/
|
||||
#[Route(path: '/api/1.0/main/address/{id}/duplicate.json', name: 'chill_api_main_address_duplicate', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/address/{id}/duplicate.json', name: 'chill_api_main_address_duplicate', methods: ['POST'])]
|
||||
public function duplicate(#[MapEntity(id: 'id')] Address $address): JsonResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_USER');
|
||||
|
@ -29,7 +29,7 @@ final class AddressReferenceAPIController extends ApiController
|
||||
{
|
||||
public function __construct(private readonly AddressReferenceRepository $addressReferenceRepository, private readonly PaginatorFactory $paginatorFactory) {}
|
||||
|
||||
#[Route(path: '/api/1.0/main/address-reference/by-postal-code/{id}/search.json')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/address-reference/by-postal-code/{id}/search.json')]
|
||||
public function search(#[MapEntity(id: 'id')] PostalCode $postalCode, Request $request): JsonResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_USER');
|
||||
|
@ -26,7 +26,7 @@ class AddressToReferenceMatcherController
|
||||
{
|
||||
public function __construct(private readonly Security $security, private readonly EntityManagerInterface $entityManager, private readonly SerializerInterface $serializer) {}
|
||||
|
||||
#[Route(path: '/api/1.0/main/address/reference-match/{id}/set/reviewed', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/address/reference-match/{id}/set/reviewed', methods: ['POST'])]
|
||||
public function markAddressAsReviewed(#[MapEntity(id: 'id')] Address $address): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted('ROLE_USER')) {
|
||||
@ -48,7 +48,7 @@ class AddressToReferenceMatcherController
|
||||
/**
|
||||
* Set an address back to "to review". Only if the address is in "reviewed" state.
|
||||
*/
|
||||
#[Route(path: '/api/1.0/main/address/reference-match/{id}/set/to_review', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/address/reference-match/{id}/set/to_review', methods: ['POST'])]
|
||||
public function markAddressAsToReview(#[MapEntity(id: 'id')] Address $address): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted('ROLE_USER')) {
|
||||
@ -71,7 +71,7 @@ class AddressToReferenceMatcherController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/api/1.0/main/address/reference-match/{id}/sync-with-reference', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/address/reference-match/{id}/sync-with-reference', methods: ['POST'])]
|
||||
public function syncAddressWithReference(#[MapEntity(id: 'id')] Address $address): JsonResponse
|
||||
{
|
||||
if (null === $address->getAddressReference()) {
|
||||
|
@ -16,31 +16,31 @@ use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class AdminController extends AbstractController
|
||||
{
|
||||
#[Route(path: '/{_locale}/admin', name: 'chill_main_admin_central')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin', name: 'chill_main_admin_central')]
|
||||
public function indexAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillMain/Admin/index.html.twig');
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/admin/language', name: 'chill_main_language_admin')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/language', name: 'chill_main_language_admin')]
|
||||
public function indexLanguageAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillMain/Admin/indexLanguage.html.twig');
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/admin/location', name: 'chill_main_location_admin')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/location', name: 'chill_main_location_admin')]
|
||||
public function indexLocationAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillMain/Admin/indexLocation.html.twig');
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/admin/user', name: 'chill_main_user_admin')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/user', name: 'chill_main_user_admin')]
|
||||
public function indexUserAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillMain/Admin/indexUser.html.twig');
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/admin/dashboard', name: 'chill_main_dashboard_admin')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/dashboard', name: 'chill_main_dashboard_admin')]
|
||||
public function indexDashboardAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillMain/Admin/indexDashboard.html.twig');
|
||||
|
@ -25,7 +25,7 @@ final readonly class DashboardApiController
|
||||
/**
|
||||
* Get user dashboard config (not yet based on user id and still hardcoded for now).
|
||||
*/
|
||||
#[Route(path: '/api/1.0/main/dashboard-config-item.json', methods: ['get'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/dashboard-config-item.json', methods: ['get'])]
|
||||
public function getDashboardConfiguration(): JsonResponse
|
||||
{
|
||||
$data = [];
|
||||
|
@ -18,7 +18,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
*/
|
||||
class DefaultController extends AbstractController
|
||||
{
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/homepage', name: 'chill_main_homepage')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/homepage', name: 'chill_main_homepage')]
|
||||
public function indexAction(): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
if ($this->isGranted('ROLE_ADMIN')) {
|
||||
@ -28,7 +28,7 @@ class DefaultController extends AbstractController
|
||||
return $this->render('@ChillMain/layout.html.twig');
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/homepage', name: 'chill_main_homepage_without_locale')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/homepage', name: 'chill_main_homepage_without_locale')]
|
||||
public function indexWithoutLocaleAction(): \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
return $this->redirectToRoute('chill_main_homepage');
|
||||
|
@ -66,7 +66,7 @@ class ExportController extends AbstractController
|
||||
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/exports/download/{alias}', name: 'chill_main_export_download', methods: ['GET'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/exports/download/{alias}', name: 'chill_main_export_download', methods: ['GET'])]
|
||||
public function downloadResultAction(Request $request, mixed $alias): Response
|
||||
{
|
||||
/** @var ExportManager $exportManager */
|
||||
@ -107,7 +107,7 @@ class ExportController extends AbstractController
|
||||
*
|
||||
* @param string $alias
|
||||
*/
|
||||
#[Route(path: '/{_locale}/exports/generate/{alias}', name: 'chill_main_export_generate', methods: ['GET'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/exports/generate/{alias}', name: 'chill_main_export_generate', methods: ['GET'])]
|
||||
public function generateAction(Request $request, $alias): Response
|
||||
{
|
||||
/** @var ExportManager $exportManager */
|
||||
@ -128,7 +128,7 @@ class ExportController extends AbstractController
|
||||
/**
|
||||
* @throws \RedisException
|
||||
*/
|
||||
#[Route(path: '/{_locale}/exports/generate-from-saved/{id}', name: 'chill_main_export_generate_from_saved')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/exports/generate-from-saved/{id}', name: 'chill_main_export_generate_from_saved')]
|
||||
public function generateFromSavedExport(#[MapEntity(id: 'id')] SavedExport $savedExport): RedirectResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted(SavedExportVoter::GENERATE, $savedExport);
|
||||
@ -150,7 +150,7 @@ class ExportController extends AbstractController
|
||||
/**
|
||||
* Render the list of available exports.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/exports/', name: 'chill_main_export_index')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/exports/', name: 'chill_main_export_index')]
|
||||
public function indexAction(): Response
|
||||
{
|
||||
$exportManager = $this->exportManager;
|
||||
@ -174,7 +174,7 @@ class ExportController extends AbstractController
|
||||
* 3. 'generate': gather data from session from the previous steps, and
|
||||
* make a redirection to the "generate" action with data in query (HTTP GET)
|
||||
*/
|
||||
#[Route(path: '/{_locale}/exports/new/{alias}', name: 'chill_main_export_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/exports/new/{alias}', name: 'chill_main_export_new')]
|
||||
public function newAction(Request $request, string $alias): Response
|
||||
{
|
||||
// first check for ACL
|
||||
@ -198,7 +198,7 @@ class ExportController extends AbstractController
|
||||
};
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/export/saved/update-from-key/{id}/{key}', name: 'chill_main_export_saved_edit_options_from_key')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/export/saved/update-from-key/{id}/{key}', name: 'chill_main_export_saved_edit_options_from_key')]
|
||||
public function editSavedExportOptionsFromKey(#[MapEntity(id: 'id')] SavedExport $savedExport, string $key): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_USER');
|
||||
@ -218,7 +218,7 @@ class ExportController extends AbstractController
|
||||
return $this->redirectToRoute('chill_main_export_saved_edit', ['id' => $savedExport->getId()]);
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/export/save-from-key/{alias}/{key}', name: 'chill_main_export_save_from_key')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/export/save-from-key/{alias}/{key}', name: 'chill_main_export_save_from_key')]
|
||||
public function saveFromKey(string $alias, string $key, Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_USER');
|
||||
@ -250,7 +250,7 @@ class ExportController extends AbstractController
|
||||
return $this->render(
|
||||
'@ChillMain/SavedExport/new.html.twig',
|
||||
[
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'saved_export' => $savedExport,
|
||||
]
|
||||
);
|
||||
@ -368,7 +368,7 @@ class ExportController extends AbstractController
|
||||
}
|
||||
|
||||
return $this->render('@ChillMain/Export/new.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'export_alias' => $alias,
|
||||
'export' => $export,
|
||||
'export_group' => $this->getExportGroup($export),
|
||||
@ -418,7 +418,7 @@ class ExportController extends AbstractController
|
||||
return $this->render(
|
||||
'@ChillMain/Export/new_formatter_step.html.twig',
|
||||
[
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'export' => $export,
|
||||
'export_group' => $this->getExportGroup($export),
|
||||
]
|
||||
@ -560,7 +560,7 @@ class ExportController extends AbstractController
|
||||
return $this->render(
|
||||
'@ChillMain/Export/new_centers_step.html.twig',
|
||||
[
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'export' => $export,
|
||||
'export_group' => $this->getExportGroup($export),
|
||||
]
|
||||
|
@ -27,7 +27,7 @@ class GeographicalUnitByAddressApiController
|
||||
{
|
||||
public function __construct(private readonly PaginatorFactory $paginatorFactory, private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly Security $security, private readonly SerializerInterface $serializer) {}
|
||||
|
||||
#[Route(path: '/api/1.0/main/geographical-unit/by-address/{id}.{_format}', requirements: ['_format' => 'json'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/geographical-unit/by-address/{id}.{_format}', requirements: ['_format' => 'json'])]
|
||||
public function getGeographicalUnitCoveringAddress(#[MapEntity(id: 'id')] Address $address): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted('ROLE_USER')) {
|
||||
|
@ -34,7 +34,7 @@ class LoginController extends AbstractController
|
||||
/**
|
||||
* Show a login form.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/login', name: 'login')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/login', name: 'login')]
|
||||
public function loginAction(Request $request): Response
|
||||
{
|
||||
return $this->render('@ChillMain/Login/login.html.twig', [
|
||||
|
@ -30,7 +30,7 @@ class NewsItemApiController
|
||||
/**
|
||||
* Get list of news items filtered on start and end date.
|
||||
*/
|
||||
#[Route(path: '/api/1.0/main/news/current.json', methods: ['get'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/news/current.json', methods: ['get'])]
|
||||
public function listCurrentNewsItems(): JsonResponse
|
||||
{
|
||||
$total = $this->newsItemRepository->countCurrentNews();
|
||||
|
@ -34,7 +34,7 @@ final readonly class NewsItemHistoryController
|
||||
private readonly Environment $environment,
|
||||
) {}
|
||||
|
||||
#[Route(path: '/{_locale}/news-items/history', name: 'chill_main_news_items_history')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/news-items/history', name: 'chill_main_news_items_history')]
|
||||
public function list(): Response
|
||||
{
|
||||
$filter = $this->buildFilterOrder();
|
||||
@ -55,7 +55,7 @@ final readonly class NewsItemHistoryController
|
||||
* @throws RuntimeError
|
||||
* @throws LoaderError
|
||||
*/
|
||||
#[Route(path: '/{_locale}/news-items/{id}', name: 'chill_main_single_news_item')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/news-items/{id}', name: 'chill_main_single_news_item')]
|
||||
public function showSingleItem(#[MapEntity(id: 'id')] NewsItem $newsItem, Request $request): Response
|
||||
{
|
||||
return new Response($this->environment->render(
|
||||
|
@ -27,24 +27,24 @@ use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
#[Route(path: '/api/1.0/main/notification')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/notification')]
|
||||
class NotificationApiController
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly NotificationRepository $notificationRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer) {}
|
||||
|
||||
#[Route(path: '/{id}/mark/read', name: 'chill_api_main_notification_mark_read', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{id}/mark/read', name: 'chill_api_main_notification_mark_read', methods: ['POST'])]
|
||||
public function markAsRead(#[MapEntity(id: 'id')] Notification $notification): JsonResponse
|
||||
{
|
||||
return $this->markAs('read', $notification);
|
||||
}
|
||||
|
||||
#[Route(path: '/{id}/mark/unread', name: 'chill_api_main_notification_mark_unread', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{id}/mark/unread', name: 'chill_api_main_notification_mark_unread', methods: ['POST'])]
|
||||
public function markAsUnread(#[MapEntity(id: 'id')] Notification $notification): JsonResponse
|
||||
{
|
||||
return $this->markAs('unread', $notification);
|
||||
}
|
||||
|
||||
#[Route(path: '/my/unread')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/my/unread')]
|
||||
public function myUnreadNotifications(Request $request): JsonResponse
|
||||
{
|
||||
$total = $this->notificationRepository->countUnreadByUser($this->security->getUser());
|
||||
@ -96,7 +96,7 @@ class NotificationApiController
|
||||
return new JsonResponse(null, JsonResponse::HTTP_ACCEPTED, [], false);
|
||||
}
|
||||
|
||||
#[Route(path: '/mark/allread', name: 'chill_api_main_notification_mark_allread', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/mark/allread', name: 'chill_api_main_notification_mark_allread', methods: ['POST'])]
|
||||
public function markAllRead(): JsonResponse
|
||||
{
|
||||
$user = $this->security->getUser();
|
||||
@ -110,7 +110,7 @@ class NotificationApiController
|
||||
return new JsonResponse($modifiedNotificationIds);
|
||||
}
|
||||
|
||||
#[Route(path: '/mark/undoallread', name: 'chill_api_main_notification_mark_undoallread', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/mark/undoallread', name: 'chill_api_main_notification_mark_undoallread', methods: ['POST'])]
|
||||
public function undoAllRead(Request $request): JsonResponse
|
||||
{
|
||||
$user = $this->security->getUser();
|
||||
|
@ -36,12 +36,12 @@ use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use function in_array;
|
||||
|
||||
#[Route(path: '/{_locale}/notification')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/notification')]
|
||||
class NotificationController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $chillLogger, private readonly LoggerInterface $logger, private readonly ChillSecurity $security, private readonly NotificationRepository $notificationRepository, private readonly NotificationHandlerManager $notificationHandlerManager, private readonly PaginatorFactory $paginatorFactory, private readonly TranslatorInterface $translator, private readonly UserRepository $userRepository, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
|
||||
|
||||
#[Route(path: '/create', name: 'chill_main_notification_create')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/create', name: 'chill_main_notification_create')]
|
||||
public function createAction(Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
|
||||
@ -93,13 +93,13 @@ class NotificationController extends AbstractController
|
||||
}
|
||||
|
||||
return $this->render('@ChillMain/Notification/create.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'handler' => $handler,
|
||||
'notification' => $notification,
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/{id}/edit', name: 'chill_main_notification_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{id}/edit', name: 'chill_main_notification_edit')]
|
||||
public function editAction(#[MapEntity(id: 'id')] Notification $notification, Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(NotificationVoter::NOTIFICATION_UPDATE, $notification);
|
||||
@ -121,13 +121,13 @@ class NotificationController extends AbstractController
|
||||
}
|
||||
|
||||
return $this->render('@ChillMain/Notification/edit.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
'handler' => $this->notificationHandlerManager->getHandler($notification),
|
||||
'notification' => $notification,
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/{id}/access_key', name: 'chill_main_notification_grant_access_by_access_key')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{id}/access_key', name: 'chill_main_notification_grant_access_by_access_key')]
|
||||
public function getAccessByAccessKey(#[MapEntity(id: 'id')] Notification $notification, Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
|
||||
@ -167,7 +167,7 @@ class NotificationController extends AbstractController
|
||||
return $this->redirectToRoute('chill_main_notification_show', ['id' => $notification->getId()]);
|
||||
}
|
||||
|
||||
#[Route(path: '/inbox', name: 'chill_main_notification_my')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/inbox', name: 'chill_main_notification_my')]
|
||||
public function inboxAction(): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_USER');
|
||||
@ -191,7 +191,7 @@ class NotificationController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/sent', name: 'chill_main_notification_sent')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/sent', name: 'chill_main_notification_sent')]
|
||||
public function sentAction(): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
|
||||
@ -215,7 +215,7 @@ class NotificationController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/{id}/show', name: 'chill_main_notification_show')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{id}/show', name: 'chill_main_notification_show')]
|
||||
public function showAction(#[MapEntity(id: 'id')] Notification $notification, Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(NotificationVoter::NOTIFICATION_SEE, $notification);
|
||||
|
@ -44,13 +44,13 @@ final class PasswordController extends AbstractController
|
||||
/**
|
||||
* @return Response
|
||||
*/
|
||||
#[Route(path: '/public/{_locale}/password/request-changed', name: 'password_request_recover_changed')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/public/{_locale}/password/request-changed', name: 'password_request_recover_changed')]
|
||||
public function changeConfirmedAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillMain/Password/recover_password_changed.html.twig');
|
||||
}
|
||||
|
||||
#[Route(path: '/public/{_locale}/password/recover', name: 'password_recover')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/public/{_locale}/password/recover', name: 'password_recover')]
|
||||
public function recoverAction(Request $request): Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
if (false === $this->isGranted(PasswordRecoverVoter::ASK_TOKEN)) {
|
||||
@ -109,7 +109,7 @@ final class PasswordController extends AbstractController
|
||||
}
|
||||
|
||||
return $this->render('@ChillMain/Password/recover_password_form.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ final class PasswordController extends AbstractController
|
||||
* @throws \Doctrine\ORM\NoResultException
|
||||
* @throws \Doctrine\ORM\NonUniqueResultException
|
||||
*/
|
||||
#[Route(path: '/public/{_locale}/password/request-recover', name: 'password_request_recover')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/public/{_locale}/password/request-recover', name: 'password_request_recover')]
|
||||
public function requestRecoverAction(Request $request): Response|\Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
if (false === $this->isGranted(PasswordRecoverVoter::ASK_TOKEN)) {
|
||||
@ -182,14 +182,14 @@ final class PasswordController extends AbstractController
|
||||
}
|
||||
|
||||
return $this->render('@ChillMain/Password/request_recover_password.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Response
|
||||
*/
|
||||
#[Route(path: '/public/{_locale}/password/request-confirm', name: 'password_request_recover_confirm')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/public/{_locale}/password/request-confirm', name: 'password_request_recover_confirm')]
|
||||
public function requestRecoverConfirmAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillMain/Password/request_recover_password_confirm.html.twig');
|
||||
@ -198,7 +198,7 @@ final class PasswordController extends AbstractController
|
||||
/**
|
||||
* @return Response
|
||||
*/
|
||||
#[Route(path: '/{_locale}/my/password', name: 'change_my_password')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/my/password', name: 'change_my_password')]
|
||||
public function UserPasswordAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
if (!$this->security->isGranted('ROLE_USER')) {
|
||||
@ -239,7 +239,7 @@ final class PasswordController extends AbstractController
|
||||
|
||||
// render into a template
|
||||
return $this->render('@ChillMain/Password/password.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ class PermissionApiController extends AbstractController
|
||||
/**
|
||||
* @throws \Symfony\Component\Serializer\Exception\ExceptionInterface
|
||||
*/
|
||||
#[Route(path: '/api/1.0/main/permissions/info.json', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/permissions/info.json', methods: ['POST'])]
|
||||
public function getPermissions(Request $request): JsonResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_USER');
|
||||
|
@ -50,7 +50,7 @@ final class PermissionsGroupController extends AbstractController
|
||||
private readonly RoleScopeRepository $roleScopeRepository,
|
||||
) {}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/permissionsgroup/{id}/add_link_role_scope', name: 'admin_permissionsgroup_add_role_scope', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/permissionsgroup/{id}/add_link_role_scope', name: 'admin_permissionsgroup_add_role_scope', methods: ['POST'])]
|
||||
public function addLinkRoleScopeAction(Request $request, int $id): Response
|
||||
{
|
||||
$permissionsGroup = $this->permissionsGroupRepository->find($id);
|
||||
@ -118,18 +118,18 @@ final class PermissionsGroupController extends AbstractController
|
||||
|
||||
return $this->render('@ChillMain/PermissionsGroup/edit.html.twig', [
|
||||
'entity' => $permissionsGroup,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
'role_scopes_sorted' => $roleScopesSorted,
|
||||
'expanded_roles' => $this->getExpandedRoles($permissionsGroup->getRoleScopes()->toArray()),
|
||||
'delete_role_scopes_form' => array_map(static fn ($form) => $form->createView(), $deleteRoleScopesForm),
|
||||
'add_role_scopes_form' => $addRoleScopesForm->createView(),
|
||||
'add_role_scopes_form' => $addRoleScopesForm,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new PermissionsGroup entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/permissionsgroup/create', name: 'admin_permissionsgroup_create', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/permissionsgroup/create', name: 'admin_permissionsgroup_create', methods: ['POST'])]
|
||||
public function createAction(Request $request): Response
|
||||
{
|
||||
$permissionsGroup = new PermissionsGroup();
|
||||
@ -145,14 +145,14 @@ final class PermissionsGroupController extends AbstractController
|
||||
|
||||
return $this->render('@ChillMain/PermissionsGroup/new.html.twig', [
|
||||
'entity' => $permissionsGroup,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/permissionsgroup/{pgid}/delete_link_role_scope/{rsid}', name: 'admin_permissionsgroup_delete_role_scope', methods: ['POST'])]
|
||||
public function deleteLinkRoleScopeAction(int $pgid, int $rsid): Response
|
||||
{
|
||||
$permissionsGroup = $this->permissionsGroupRepository->find($pgid);
|
||||
@ -209,7 +209,7 @@ final class PermissionsGroupController extends AbstractController
|
||||
/**
|
||||
* Displays a form to edit an existing PermissionsGroup entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/permissionsgroup/{id}/edit', name: 'admin_permissionsgroup_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/permissionsgroup/{id}/edit', name: 'admin_permissionsgroup_edit')]
|
||||
public function editAction(int $id): Response
|
||||
{
|
||||
$permissionsGroup = $this->permissionsGroupRepository->find($id);
|
||||
@ -246,17 +246,17 @@ final class PermissionsGroupController extends AbstractController
|
||||
return $this->render('@ChillMain/PermissionsGroup/edit.html.twig', [
|
||||
'entity' => $permissionsGroup,
|
||||
'role_scopes_sorted' => $roleScopesSorted,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
'expanded_roles' => $this->getExpandedRoles($permissionsGroup->getRoleScopes()->toArray()),
|
||||
'delete_role_scopes_form' => array_map(static fn ($form) => $form->createView(), $deleteRoleScopesForm),
|
||||
'add_role_scopes_form' => $addRoleScopesForm->createView(),
|
||||
'add_role_scopes_form' => $addRoleScopesForm,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all PermissionsGroup entities.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/permissionsgroup/', name: 'admin_permissionsgroup')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/permissionsgroup/', name: 'admin_permissionsgroup')]
|
||||
public function indexAction(): Response
|
||||
{
|
||||
$entities = $this->permissionsGroupRepository->findAllOrderedAlphabetically();
|
||||
@ -269,7 +269,7 @@ final class PermissionsGroupController extends AbstractController
|
||||
/**
|
||||
* Displays a form to create a new PermissionsGroup entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/permissionsgroup/new', name: 'admin_permissionsgroup_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/permissionsgroup/new', name: 'admin_permissionsgroup_new')]
|
||||
public function newAction(): Response
|
||||
{
|
||||
$permissionsGroup = new PermissionsGroup();
|
||||
@ -277,14 +277,14 @@ final class PermissionsGroupController extends AbstractController
|
||||
|
||||
return $this->render('@ChillMain/PermissionsGroup/new.html.twig', [
|
||||
'entity' => $permissionsGroup,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds and displays a PermissionsGroup entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/permissionsgroup/{id}/show', name: 'admin_permissionsgroup_show')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/permissionsgroup/{id}/show', name: 'admin_permissionsgroup_show')]
|
||||
public function showAction(int $id): Response
|
||||
{
|
||||
$permissionsGroup = $this->permissionsGroupRepository->find($id);
|
||||
@ -336,7 +336,7 @@ final class PermissionsGroupController extends AbstractController
|
||||
/**
|
||||
* Edits an existing PermissionsGroup entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/permissionsgroup/{id}/update', name: 'admin_permissionsgroup_update', methods: ['POST', 'PUT'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/permissionsgroup/{id}/update', name: 'admin_permissionsgroup_update', methods: ['POST', 'PUT'])]
|
||||
public function updateAction(Request $request, int $id): Response
|
||||
{
|
||||
$permissionsGroup = $this->permissionsGroupRepository
|
||||
@ -380,10 +380,10 @@ final class PermissionsGroupController extends AbstractController
|
||||
return $this->render('@ChillMain/PermissionsGroup/edit.html.twig', [
|
||||
'entity' => $permissionsGroup,
|
||||
'role_scopes_sorted' => $roleScopesSorted,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
'expanded_roles' => $this->getExpandedRoles($permissionsGroup->getRoleScopes()->toArray()),
|
||||
'delete_role_scopes_form' => array_map(static fn ($form) => $form->createView(), $deleteRoleScopesForm),
|
||||
'add_role_scopes_form' => $addRoleScopesForm->createView(),
|
||||
'add_role_scopes_form' => $addRoleScopesForm,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ final class PostalCodeAPIController extends ApiController
|
||||
{
|
||||
public function __construct(private readonly CountryRepository $countryRepository, private readonly PostalCodeRepositoryInterface $postalCodeRepository, private readonly PaginatorFactory $paginatorFactory) {}
|
||||
|
||||
#[Route(path: '/api/1.0/main/postal-code/search.json')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/postal-code/search.json')]
|
||||
public function search(Request $request): JsonResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_USER');
|
||||
|
@ -37,7 +37,7 @@ class PostalCodeController extends AbstractController
|
||||
/**
|
||||
* @return JsonResponse
|
||||
*/
|
||||
#[Route(path: '{_locale}/postalcode/search')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/postalcode/search')]
|
||||
public function searchAction(Request $request)
|
||||
{
|
||||
$pattern = $request->query->getAlnum('q', '');
|
||||
|
@ -37,7 +37,7 @@ class SavedExportController
|
||||
{
|
||||
public function __construct(private readonly \Twig\Environment $templating, private readonly EntityManagerInterface $entityManager, private readonly ExportManager $exportManager, private readonly FormFactoryInterface $formFactory, private readonly SavedExportRepositoryInterface $savedExportRepository, private readonly Security $security, private readonly RequestStack $requestStack, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator) {}
|
||||
|
||||
#[Route(path: '/{_locale}/exports/saved/{id}/delete', name: 'chill_main_export_saved_delete')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/exports/saved/{id}/delete', name: 'chill_main_export_saved_delete')]
|
||||
public function delete(#[MapEntity(id: 'id')] SavedExport $savedExport, Request $request): Response
|
||||
{
|
||||
if (!$this->security->isGranted(SavedExportVoter::DELETE, $savedExport)) {
|
||||
@ -70,7 +70,7 @@ class SavedExportController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/exports/saved/{id}/edit', name: 'chill_main_export_saved_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/exports/saved/{id}/edit', name: 'chill_main_export_saved_edit')]
|
||||
public function edit(#[MapEntity(id: 'id')] SavedExport $savedExport, Request $request): Response
|
||||
{
|
||||
if (!$this->security->isGranted(SavedExportVoter::EDIT, $savedExport)) {
|
||||
@ -101,7 +101,7 @@ class SavedExportController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/exports/saved/my', name: 'chill_main_export_saved_list_my')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/exports/saved/my', name: 'chill_main_export_saved_list_my')]
|
||||
public function list(): Response
|
||||
{
|
||||
$user = $this->security->getUser();
|
||||
|
@ -35,7 +35,7 @@ class ScopeController extends AbstractController
|
||||
/**
|
||||
* Creates a new Scope entity.
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/scope/create', name: 'admin_scope_create', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/scope/create', name: 'admin_scope_create', methods: ['POST'])]
|
||||
public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$scope = new Scope();
|
||||
@ -52,14 +52,14 @@ class ScopeController extends AbstractController
|
||||
|
||||
return $this->render('@ChillMain/Scope/new.html.twig', [
|
||||
'entity' => $scope,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a form to edit an existing Scope entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/scope/{id}/edit', name: 'admin_scope_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/scope/{id}/edit', name: 'admin_scope_edit')]
|
||||
public function editAction(#[MapEntity(id: 'id')] Scope $scope, Request $request): Response
|
||||
{
|
||||
$editForm = $this->createEditForm($scope);
|
||||
@ -73,14 +73,14 @@ class ScopeController extends AbstractController
|
||||
|
||||
return $this->render('@ChillMain/Scope/edit.html.twig', [
|
||||
'entity' => $scope,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Scope entities.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/scope/', name: 'admin_scope')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/scope/', name: 'admin_scope')]
|
||||
public function indexAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -95,7 +95,7 @@ class ScopeController extends AbstractController
|
||||
/**
|
||||
* Displays a form to create a new Scope entity.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/scope/new', name: 'admin_scope_new')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/scope/new', name: 'admin_scope_new')]
|
||||
public function newAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$scope = new Scope();
|
||||
@ -103,7 +103,7 @@ class ScopeController extends AbstractController
|
||||
|
||||
return $this->render('@ChillMain/Scope/new.html.twig', [
|
||||
'entity' => $scope,
|
||||
'form' => $form->createView(),
|
||||
'form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ class SearchController extends AbstractController
|
||||
{
|
||||
public function __construct(protected SearchProvider $searchProvider, protected TranslatorInterface $translator, protected PaginatorFactory $paginatorFactory, protected SearchApi $searchApi) {}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/search/advanced/{name}', name: 'chill_main_advanced_search')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/search/advanced/{name}', name: 'chill_main_advanced_search')]
|
||||
public function advancedSearchAction(mixed $name, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
try {
|
||||
@ -79,7 +79,7 @@ class SearchController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/search/advanced', name: 'chill_main_advanced_search_list')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/search/advanced', name: 'chill_main_advanced_search_list')]
|
||||
public function advancedSearchListAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
/** @var Chill\MainBundle\Search\SearchProvider $variable */
|
||||
@ -96,7 +96,7 @@ class SearchController extends AbstractController
|
||||
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', '_locale' => '[a-z]{1,3}'], defaults: ['_format' => 'html'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/search.{_format}', name: 'chill_main_search', requirements: ['_format' => 'html|json', '_locale' => '[a-z]{1,3}'], defaults: ['_format' => 'html'])]
|
||||
public function searchAction(Request $request, mixed $_format)
|
||||
{
|
||||
$pattern = trim((string) $request->query->get('q', ''));
|
||||
@ -186,7 +186,7 @@ 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'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/search.{_format}', name: 'chill_main_search_global', requirements: ['_format' => 'json'], defaults: ['_format' => 'json'])]
|
||||
public function searchApi(Request $request, mixed $_format): JsonResponse
|
||||
{
|
||||
// TODO this is an incomplete implementation
|
||||
|
@ -22,7 +22,7 @@ class TimelineCenterController extends AbstractController
|
||||
{
|
||||
public function __construct(protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory, private readonly Security $security) {}
|
||||
|
||||
#[Route(path: '/{_locale}/center/timeline', name: 'chill_center_timeline', methods: ['GET'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/center/timeline', name: 'chill_center_timeline', methods: ['GET'])]
|
||||
public function centerAction(Request $request): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
// collect reachable center for each group
|
||||
|
@ -24,7 +24,7 @@ class UserApiController extends ApiController
|
||||
{
|
||||
public function __construct(private readonly ChillSecurity $security) {}
|
||||
|
||||
#[Route(path: '/api/1.0/main/user-current-location.{_format}', name: 'chill_main_user_current_location', requirements: ['_format' => 'json'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/user-current-location.{_format}', name: 'chill_main_user_current_location', requirements: ['_format' => 'json'])]
|
||||
public function currentLocation(mixed $_format): JsonResponse
|
||||
{
|
||||
if (!$this->isGranted('ROLE_USER')) {
|
||||
@ -39,7 +39,7 @@ class UserApiController extends ApiController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/api/1.0/main/whoami.{_format}', name: 'chill_main_user_whoami', requirements: ['_format' => 'json'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/whoami.{_format}', name: 'chill_main_user_whoami', requirements: ['_format' => 'json'])]
|
||||
public function whoami(mixed $_format): JsonResponse
|
||||
{
|
||||
return $this->json(
|
||||
|
@ -53,7 +53,7 @@ class UserController extends CRUDController
|
||||
private readonly ManagerRegistry $managerRegistry,
|
||||
) {}
|
||||
|
||||
#[Route(path: '/{_locale}/admin/main/user/{uid}/add_link_groupcenter', name: 'admin_user_add_groupcenter')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/main/user/{uid}/add_link_groupcenter', name: 'admin_user_add_groupcenter')]
|
||||
public function addLinkGroupCenterAction(Request $request, mixed $uid): Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -98,7 +98,7 @@ class UserController extends CRUDController
|
||||
'entity' => $user,
|
||||
'access_permissions_group_list' => $this->parameterBag->get('chill_main.access_permissions_group_list'),
|
||||
'edit_form' => $this->createEditForm($user)->createView(),
|
||||
'add_groupcenter_form' => $this->createAddLinkGroupCenterForm($user, $request)->createView(),
|
||||
'add_groupcenter_form' => $this->createAddLinkGroupCenterForm($user, $request),
|
||||
'delete_groupcenter_form' => array_map(
|
||||
static fn (Form $form) => $form->createView(),
|
||||
iterator_to_array($this->getDeleteLinkGroupCenterByUser($user, $request), true)
|
||||
@ -106,7 +106,7 @@ class UserController extends CRUDController
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/admin/main/user/{uid}/delete_link_groupcenter/{gcid}', name: 'admin_user_delete_groupcenter')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/main/user/{uid}/delete_link_groupcenter/{gcid}', name: 'admin_user_delete_groupcenter')]
|
||||
public function deleteLinkGroupCenterAction(mixed $uid, mixed $gcid, Request $request): RedirectResponse
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
@ -204,7 +204,7 @@ class UserController extends CRUDController
|
||||
/**
|
||||
* Displays a form to edit the user current location.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/main/user/current-location/edit', name: 'chill_main_user_currentlocation_edit')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/main/user/current-location/edit', name: 'chill_main_user_currentlocation_edit')]
|
||||
public function editCurrentLocationAction(Request $request): RedirectResponse|Response
|
||||
{
|
||||
$user = $this->security->getUser();
|
||||
@ -228,14 +228,14 @@ class UserController extends CRUDController
|
||||
|
||||
return $this->render('@ChillMain/User/edit_current_location.html.twig', [
|
||||
'entity' => $user,
|
||||
'edit_form' => $form->createView(),
|
||||
'edit_form' => $form,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a form to edit the user password.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/user/{id}/edit_password', name: 'admin_user_edit_password')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/user/{id}/edit_password', name: 'admin_user_edit_password')]
|
||||
public function editPasswordAction(#[MapEntity(id: 'id')] User $user, Request $request): RedirectResponse|Response
|
||||
{
|
||||
$editForm = $this->createEditPasswordForm($user);
|
||||
@ -263,7 +263,7 @@ class UserController extends CRUDController
|
||||
|
||||
return $this->render('@ChillMain/User/edit_password.html.twig', [
|
||||
'entity' => $user,
|
||||
'edit_form' => $editForm->createView(),
|
||||
'edit_form' => $editForm,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ final readonly class UserExportController
|
||||
* @throws \League\Csv\Exception
|
||||
* @throws \League\Csv\UnavailableStream
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/main/users/export/list.{_format}', requirements: ['_format' => 'csv'], name: 'chill_main_users_export_list')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/main/users/export/list.{_format}', requirements: ['_format' => 'csv'], name: 'chill_main_users_export_list')]
|
||||
public function userList(Request $request, string $_format = 'csv'): StreamedResponse
|
||||
{
|
||||
if (!$this->security->isGranted('ROLE_ADMIN')) {
|
||||
@ -95,7 +95,7 @@ final readonly class UserExportController
|
||||
* @throws \League\Csv\Exception
|
||||
* @throws \League\Csv\UnavailableStream
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/main/users/export/permissions.{_format}', requirements: ['_format' => 'csv'], name: 'chill_main_users_export_permissions')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/main/users/export/permissions.{_format}', requirements: ['_format' => 'csv'], name: 'chill_main_users_export_permissions')]
|
||||
public function userPermissionsList(string $_format = 'csv'): StreamedResponse
|
||||
{
|
||||
if (!$this->security->isGranted('ROLE_ADMIN')) {
|
||||
|
@ -50,7 +50,7 @@ final readonly class UserGroupController
|
||||
private ChillEntityRenderManagerInterface $chillEntityRenderManager,
|
||||
) {}
|
||||
|
||||
#[Route('/{_locale}/main/user-groups/my', name: 'chill_main_user_groups_my')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/{_locale}/main/user-groups/my', name: 'chill_main_user_groups_my')]
|
||||
public function myUserGroups(): Response
|
||||
{
|
||||
if (!$this->security->isGranted('ROLE_USER')) {
|
||||
@ -80,7 +80,7 @@ final readonly class UserGroupController
|
||||
]));
|
||||
}
|
||||
|
||||
#[Route('/{_locale}/main/user-groups/{id}/append', name: 'chill_main_user_groups_append_users')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/{_locale}/main/user-groups/{id}/append', name: 'chill_main_user_groups_append_users')]
|
||||
public function appendUsersToGroup(UserGroup $userGroup, Request $request, Session $session): Response
|
||||
{
|
||||
if (!$this->security->isGranted(UserGroupVoter::APPEND_TO_GROUP, $userGroup)) {
|
||||
@ -130,7 +130,7 @@ final readonly class UserGroupController
|
||||
/**
|
||||
* @ParamConverter("user", class=User::class, options={"id" = "userId"})
|
||||
*/
|
||||
#[Route('/{_locale}/main/user-group/{id}/user/{userId}/remove', name: 'chill_main_user_groups_remove_user')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/{_locale}/main/user-group/{id}/user/{userId}/remove', name: 'chill_main_user_groups_remove_user')]
|
||||
public function removeUserToGroup(UserGroup $userGroup, User $user, Session $session): Response
|
||||
{
|
||||
if (!$this->security->isGranted(UserGroupVoter::APPEND_TO_GROUP, $userGroup)) {
|
||||
|
@ -24,7 +24,7 @@ class UserJobScopeHistoriesController extends AbstractController
|
||||
private readonly Environment $engine,
|
||||
) {}
|
||||
|
||||
#[Route(path: '/{_locale}/admin/main/user/{id}/job-scope-history', name: 'admin_user_job_scope_history')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/admin/main/user/{id}/job-scope-history', name: 'admin_user_job_scope_history')]
|
||||
public function indexAction(#[MapEntity(id: 'id')] User $user): Response
|
||||
{
|
||||
$jobHistories = $user->getUserJobHistoriesOrdered();
|
||||
|
@ -33,7 +33,7 @@ final class UserProfileController extends AbstractController
|
||||
/**
|
||||
* User profile that allows editing of phonenumber and visualization of certain data.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/main/user/my-profile', name: 'chill_main_user_profile')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/main/user/my-profile', name: 'chill_main_user_profile')]
|
||||
public function __invoke(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
if (!$this->security->isGranted('ROLE_USER')) {
|
||||
@ -57,7 +57,7 @@ final class UserProfileController extends AbstractController
|
||||
|
||||
return $this->render('@ChillMain/User/profile.html.twig', [
|
||||
'user' => $user,
|
||||
'form' => $editForm->createView(),
|
||||
'form' => $editForm,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ final readonly class WorkflowAddSignatureController
|
||||
private Security $security,
|
||||
) {}
|
||||
|
||||
#[Route(path: '/{_locale}/main/workflow/signature/{id}/sign', name: 'chill_main_workflow_signature_add', methods: 'GET')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/main/workflow/signature/{id}/sign', name: 'chill_main_workflow_signature_add', methods: 'GET')]
|
||||
public function __invoke(EntityWorkflowStepSignature $signature, Request $request): Response
|
||||
{
|
||||
if (!$this->security->isGranted(EntityWorkflowStepSignatureVoter::SIGN, $signature)) {
|
||||
|
@ -35,7 +35,7 @@ class WorkflowApiController
|
||||
/**
|
||||
* Return a list of workflow which are waiting an action for the user.
|
||||
*/
|
||||
#[Route(path: '/api/1.0/main/workflow/my', methods: ['GET'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/workflow/my', methods: ['GET'])]
|
||||
public function myWorkflow(Request $request): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted('ROLE_USER') || !$this->security->getUser() instanceof User) {
|
||||
@ -73,7 +73,7 @@ class WorkflowApiController
|
||||
/**
|
||||
* Return a list of workflow which are waiting an action for the user.
|
||||
*/
|
||||
#[Route(path: '/api/1.0/main/workflow/my-cc', methods: ['GET'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/workflow/my-cc', methods: ['GET'])]
|
||||
public function myWorkflowCc(Request $request): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted('ROLE_USER') || !$this->security->getUser() instanceof User) {
|
||||
@ -108,13 +108,13 @@ class WorkflowApiController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/api/1.0/main/workflow/{id}/subscribe', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/workflow/{id}/subscribe', methods: ['POST'])]
|
||||
public function subscribe(#[MapEntity(id: 'id')] EntityWorkflow $entityWorkflow, Request $request): Response
|
||||
{
|
||||
return $this->handleSubscription($entityWorkflow, $request, 'subscribe');
|
||||
}
|
||||
|
||||
#[Route(path: '/api/1.0/main/workflow/{id}/unsubscribe', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/workflow/{id}/unsubscribe', methods: ['POST'])]
|
||||
public function unsubscribe(#[MapEntity(id: 'id')] EntityWorkflow $entityWorkflow, Request $request): Response
|
||||
{
|
||||
return $this->handleSubscription($entityWorkflow, $request, 'unsubscribe');
|
||||
|
@ -37,7 +37,7 @@ class WorkflowAttachmentController
|
||||
private readonly AddAttachmentAction $addAttachmentAction,
|
||||
) {}
|
||||
|
||||
#[Route('/api/1.0/main/workflow/{id}/attachment', methods: ['POST'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/api/1.0/main/workflow/{id}/attachment', methods: ['POST'])]
|
||||
public function addAttachment(EntityWorkflow $entityWorkflow, Request $request): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted(EntityWorkflowVoter::SEE, $entityWorkflow)) {
|
||||
@ -69,7 +69,7 @@ class WorkflowAttachmentController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route('/api/1.0/main/workflow/attachment/{id}', methods: ['DELETE'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/api/1.0/main/workflow/attachment/{id}', methods: ['DELETE'])]
|
||||
public function removeAttachment(EntityWorkflowAttachment $attachment): Response
|
||||
{
|
||||
if (!$this->security->isGranted(EntityWorkflowVoter::SEE, $attachment->getEntityWorkflow())) {
|
||||
@ -82,7 +82,7 @@ class WorkflowAttachmentController
|
||||
return new Response(null, Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
|
||||
#[Route('/api/1.0/main/workflow/{id}/attachment', methods: ['GET'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/api/1.0/main/workflow/{id}/attachment', methods: ['GET'])]
|
||||
public function listAttachmentsForEntityWorkflow(EntityWorkflow $entityWorkflow): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted(EntityWorkflowVoter::SEE, $entityWorkflow)) {
|
||||
|
@ -57,7 +57,7 @@ class WorkflowController extends AbstractController
|
||||
private readonly EntityWorkflowStepSignatureRepository $entityWorkflowStepSignatureRepository,
|
||||
) {}
|
||||
|
||||
#[Route(path: '/{_locale}/main/workflow/create', name: 'chill_main_workflow_create')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/main/workflow/create', name: 'chill_main_workflow_create')]
|
||||
public function create(Request $request): Response
|
||||
{
|
||||
if (!$request->query->has('entityClass')) {
|
||||
@ -101,7 +101,7 @@ class WorkflowController extends AbstractController
|
||||
return $this->redirectToRoute('chill_main_workflow_show', ['id' => $entityWorkflow->getId()]);
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/main/workflow/{id}/delete', name: 'chill_main_workflow_delete')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/main/workflow/{id}/delete', name: 'chill_main_workflow_delete')]
|
||||
public function delete(#[MapEntity(id: 'id')] EntityWorkflow $entityWorkflow, Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(EntityWorkflowVoter::DELETE, $entityWorkflow);
|
||||
@ -121,12 +121,12 @@ class WorkflowController extends AbstractController
|
||||
|
||||
return $this->render('@ChillMain/Workflow/delete.html.twig', [
|
||||
'entityWorkflow' => $entityWorkflow,
|
||||
'delete_form' => $form->createView(),
|
||||
'delete_form' => $form,
|
||||
'handler' => $this->entityWorkflowManager->getHandler($entityWorkflow),
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/main/workflow-step/{id}/access_key', name: 'chill_main_workflow_grant_access_by_key')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/main/workflow-step/{id}/access_key', name: 'chill_main_workflow_grant_access_by_key')]
|
||||
public function getAccessByAccessKey(#[MapEntity(id: 'id')] EntityWorkflowStep $entityWorkflowStep, Request $request): Response
|
||||
{
|
||||
if (null === $accessKey = $request->query->get('accessKey', null)) {
|
||||
@ -155,7 +155,7 @@ class WorkflowController extends AbstractController
|
||||
/**
|
||||
* Previous workflows where the user has applyed a transition.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/main/workflow/list/previous_transitionned', name: 'chill_main_workflow_list_previous_transitionned')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/main/workflow/list/previous_transitionned', name: 'chill_main_workflow_list_previous_transitionned')]
|
||||
public function myPreviousWorkflowsTransitionned(Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
|
||||
@ -184,7 +184,7 @@ class WorkflowController extends AbstractController
|
||||
/**
|
||||
* Previous workflows where the user was mentioned, but did not give any reaction.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/main/workflow/list/previous_without_reaction', name: 'chill_main_workflow_list_previous_without_reaction')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/main/workflow/list/previous_without_reaction', name: 'chill_main_workflow_list_previous_without_reaction')]
|
||||
public function myPreviousWorkflowsWithoutReaction(Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
|
||||
@ -210,7 +210,7 @@ class WorkflowController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/main/workflow/list/cc', name: 'chill_main_workflow_list_cc')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/main/workflow/list/cc', name: 'chill_main_workflow_list_cc')]
|
||||
public function myWorkflowsCc(Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
|
||||
@ -235,7 +235,7 @@ class WorkflowController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/main/workflow/list/dest', name: 'chill_main_workflow_list_dest')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/main/workflow/list/dest', name: 'chill_main_workflow_list_dest')]
|
||||
public function myWorkflowsDest(Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
|
||||
@ -260,7 +260,7 @@ class WorkflowController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/main/workflow/list/subscribed', name: 'chill_main_workflow_list_subscribed')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/main/workflow/list/subscribed', name: 'chill_main_workflow_list_subscribed')]
|
||||
public function myWorkflowsSubscribed(Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
|
||||
@ -288,7 +288,7 @@ class WorkflowController extends AbstractController
|
||||
/**
|
||||
* @throws NonUniqueResultException
|
||||
*/
|
||||
#[Route(path: '/{_locale}/main/workflow/{id}/show', name: 'chill_main_workflow_show')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/main/workflow/{id}/show', name: 'chill_main_workflow_show')]
|
||||
public function show(#[MapEntity(id: 'id')] EntityWorkflow $entityWorkflow, Request $request): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(EntityWorkflowVoter::SEE, $entityWorkflow);
|
||||
@ -372,7 +372,7 @@ class WorkflowController extends AbstractController
|
||||
return $lines;
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/main/workflow/signature/{signature_id}/metadata', name: 'chill_main_workflow_signature_metadata')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/main/workflow/signature/{signature_id}/metadata', name: 'chill_main_workflow_signature_metadata')]
|
||||
public function addSignatureMetadata(int $signature_id, Request $request): Response
|
||||
{
|
||||
$signature = $this->entityWorkflowStepSignatureRepository->find($signature_id);
|
||||
@ -427,7 +427,7 @@ class WorkflowController extends AbstractController
|
||||
return $this->render(
|
||||
'@ChillMain/Workflow/signature_metadata.html.twig',
|
||||
[
|
||||
'metadata_form' => $metadataForm->createView(),
|
||||
'metadata_form' => $metadataForm,
|
||||
'person' => $signature->getSigner(),
|
||||
]
|
||||
);
|
||||
|
@ -35,7 +35,7 @@ class WorkflowOnHoldController
|
||||
private readonly UrlGeneratorInterface $urlGenerator,
|
||||
) {}
|
||||
|
||||
#[Route(path: '/{_locale}/main/workflow/{id}/hold', name: 'chill_main_workflow_on_hold')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/main/workflow/{id}/hold', name: 'chill_main_workflow_on_hold')]
|
||||
public function putOnHold(EntityWorkflow $entityWorkflow, Request $request): Response
|
||||
{
|
||||
$currentStep = $entityWorkflow->getCurrentStep();
|
||||
@ -65,7 +65,7 @@ class WorkflowOnHoldController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/main/workflow/{id}/remove_hold', name: 'chill_main_workflow_remove_hold')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/main/workflow/{id}/remove_hold', name: 'chill_main_workflow_remove_hold')]
|
||||
public function removeOnHold(EntityWorkflowStep $entityWorkflowStep): Response
|
||||
{
|
||||
$user = $this->security->getUser();
|
||||
|
@ -37,7 +37,7 @@ final readonly class WorkflowSignatureStateChangeController
|
||||
private ChillUrlGeneratorInterface $chillUrlGenerator,
|
||||
) {}
|
||||
|
||||
#[Route('/{_locale}/main/workflow/signature/{id}/cancel', name: 'chill_main_workflow_signature_cancel')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/{_locale}/main/workflow/signature/{id}/cancel', name: 'chill_main_workflow_signature_cancel')]
|
||||
public function cancelSignature(EntityWorkflowStepSignature $signature, Request $request): Response
|
||||
{
|
||||
return $this->markSignatureAction(
|
||||
@ -49,7 +49,7 @@ final readonly class WorkflowSignatureStateChangeController
|
||||
);
|
||||
}
|
||||
|
||||
#[Route('/{_locale}/main/workflow/signature/{id}/reject', name: 'chill_main_workflow_signature_reject')]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/{_locale}/main/workflow/signature/{id}/reject', name: 'chill_main_workflow_signature_reject')]
|
||||
public function rejectSignature(EntityWorkflowStepSignature $signature, Request $request): Response
|
||||
{
|
||||
return $this->markSignatureAction(
|
||||
|
@ -40,7 +40,7 @@ final readonly class WorkflowViewSendPublicController
|
||||
private MessageBusInterface $messageBus,
|
||||
) {}
|
||||
|
||||
#[Route('/public/main/workflow/send/{uuid}/view/{verificationKey}', name: 'chill_main_workflow_send_view_public', methods: ['GET'])]
|
||||
#[\Symfony\Component\Routing\Attribute\Route('/public/main/workflow/send/{uuid}/view/{verificationKey}', name: 'chill_main_workflow_send_view_public', methods: ['GET'])]
|
||||
public function __invoke(EntityWorkflowSend $workflowSend, string $verificationKey, Request $request): Response
|
||||
{
|
||||
if (50 < $workflowSend->getNumberOfErrorTrials()) {
|
||||
|
@ -51,10 +51,10 @@ class CronManager implements CronManagerInterface
|
||||
* @param CronJobInterface[] $jobs
|
||||
*/
|
||||
public function __construct(
|
||||
private CronJobExecutionRepositoryInterface $cronJobExecutionRepository,
|
||||
private EntityManagerInterface $entityManager,
|
||||
private iterable $jobs,
|
||||
private LoggerInterface $logger,
|
||||
private readonly CronJobExecutionRepositoryInterface $cronJobExecutionRepository,
|
||||
private readonly EntityManagerInterface $entityManager,
|
||||
private readonly iterable $jobs,
|
||||
private readonly LoggerInterface $logger,
|
||||
) {}
|
||||
|
||||
public function run(?string $forceJob = null): void
|
||||
|
@ -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);
|
||||
|
@ -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());
|
||||
|
@ -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,
|
||||
]);
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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) {
|
||||
|
@ -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();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user