mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-04 12:29:43 +00:00
Run symfonysetlist up to symfony_70
This commit is contained in:
@@ -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');
|
||||
|
Reference in New Issue
Block a user