mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 06:44:59 +00:00
Merge branch 'master' into upgrade-sf5
This commit is contained in:
@@ -26,7 +26,9 @@ use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
|
||||
final class AddressReferenceAPIController extends ApiController
|
||||
{
|
||||
public function __construct(private readonly AddressReferenceRepository $addressReferenceRepository, private readonly PaginatorFactory $paginatorFactory) {}
|
||||
public function __construct(private readonly AddressReferenceRepository $addressReferenceRepository, private readonly PaginatorFactory $paginatorFactory)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/address-reference/by-postal-code/{id}/search.json")
|
||||
|
@@ -23,7 +23,9 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class AddressToReferenceMatcherController
|
||||
{
|
||||
public function __construct(private readonly Security $security, private readonly EntityManagerInterface $entityManager, private readonly SerializerInterface $serializer) {}
|
||||
public function __construct(private readonly Security $security, private readonly EntityManagerInterface $entityManager, private readonly SerializerInterface $serializer)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/address/reference-match/{id}/set/reviewed", methods={"POST"})
|
||||
|
@@ -334,7 +334,7 @@ class ExportController extends AbstractController
|
||||
* When the method is POST, the form is stored if valid, and a redirection
|
||||
* is done to next step.
|
||||
*/
|
||||
private function exportFormStep(Request $request, DirectExportInterface|ExportInterface $export, string $alias, SavedExport $savedExport = null): Response
|
||||
private function exportFormStep(Request $request, DirectExportInterface|ExportInterface $export, string $alias, ?SavedExport $savedExport = null): Response
|
||||
{
|
||||
$exportManager = $this->exportManager;
|
||||
|
||||
@@ -392,7 +392,7 @@ class ExportController extends AbstractController
|
||||
* If the form is posted and valid, store the data in session and
|
||||
* redirect to the next step.
|
||||
*/
|
||||
private function formatterFormStep(Request $request, DirectExportInterface|ExportInterface $export, string $alias, SavedExport $savedExport = null): Response
|
||||
private function formatterFormStep(Request $request, DirectExportInterface|ExportInterface $export, string $alias, ?SavedExport $savedExport = null): Response
|
||||
{
|
||||
// check we have data from the previous step (export step)
|
||||
$data = $this->session->get('export_step', null);
|
||||
@@ -521,7 +521,7 @@ class ExportController extends AbstractController
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
private function selectCentersStep(Request $request, DirectExportInterface|ExportInterface $export, $alias, SavedExport $savedExport = null)
|
||||
private function selectCentersStep(Request $request, DirectExportInterface|ExportInterface $export, $alias, ?SavedExport $savedExport = null)
|
||||
{
|
||||
if (!$this->filterStatsByCenters) {
|
||||
return $this->redirectToRoute('chill_main_export_new', [
|
||||
|
@@ -24,7 +24,9 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class GeographicalUnitByAddressApiController
|
||||
{
|
||||
public function __construct(private readonly PaginatorFactory $paginatorFactory, private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly Security $security, private readonly SerializerInterface $serializer) {}
|
||||
public function __construct(private readonly PaginatorFactory $paginatorFactory, private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly Security $security, private readonly SerializerInterface $serializer)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/geographical-unit/by-address/{id}.{_format}", requirements={"_format": "json"})
|
||||
|
@@ -13,4 +13,6 @@ namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\CRUD\Controller\CRUDController;
|
||||
|
||||
class LocationTypeController extends CRUDController {}
|
||||
class LocationTypeController extends CRUDController
|
||||
{
|
||||
}
|
||||
|
@@ -46,5 +46,7 @@ class LoginController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
public function LoginCheckAction(Request $request) {}
|
||||
public function LoginCheckAction(Request $request)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@@ -31,7 +31,9 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
*/
|
||||
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) {}
|
||||
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly NotificationRepository $notificationRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{id}/mark/read", name="chill_api_main_notification_mark_read", methods={"POST"})
|
||||
|
@@ -40,7 +40,9 @@ use function in_array;
|
||||
*/
|
||||
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) {}
|
||||
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("/create", name="chill_main_notification_create")
|
||||
|
@@ -21,7 +21,9 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||
|
||||
class PermissionApiController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly Security $security) {}
|
||||
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/permissions/info.json", methods={"POST"})
|
||||
|
@@ -47,7 +47,8 @@ final class PermissionsGroupController extends AbstractController
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly PermissionsGroupRepository $permissionsGroupRepository,
|
||||
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={"PUT"})
|
||||
@@ -399,7 +400,7 @@ final class PermissionsGroupController extends AbstractController
|
||||
* get a role scope by his parameters. The role scope is persisted if it
|
||||
* doesn't exist in database.
|
||||
*/
|
||||
protected function getPersistentRoleScopeBy(string $role, Scope $scope = null): RoleScope
|
||||
protected function getPersistentRoleScopeBy(string $role, ?Scope $scope = null): RoleScope
|
||||
{
|
||||
$roleScope = $this->roleScopeRepository
|
||||
->findOneBy(['role' => $role, 'scope' => $scope]);
|
||||
|
@@ -26,7 +26,9 @@ use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
|
||||
final class PostalCodeAPIController extends ApiController
|
||||
{
|
||||
public function __construct(private readonly CountryRepository $countryRepository, private readonly PostalCodeRepositoryInterface $postalCodeRepository, private readonly PaginatorFactory $paginatorFactory) {}
|
||||
public function __construct(private readonly CountryRepository $countryRepository, private readonly PostalCodeRepositoryInterface $postalCodeRepository, private readonly PaginatorFactory $paginatorFactory)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/postal-code/search.json")
|
||||
|
@@ -34,7 +34,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
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 SessionInterface $session, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator) {}
|
||||
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 SessionInterface $session, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/exports/saved/{id}/delete", name="chill_main_export_saved_delete")
|
||||
|
@@ -32,7 +32,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
*/
|
||||
class SearchController extends AbstractController
|
||||
{
|
||||
public function __construct(protected SearchProvider $searchProvider, protected TranslatorInterface $translator, protected PaginatorFactory $paginatorFactory, protected SearchApi $searchApi) {}
|
||||
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")
|
||||
|
@@ -20,7 +20,9 @@ use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class TimelineCenterController extends AbstractController
|
||||
{
|
||||
public function __construct(protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory, private readonly Security $security) {}
|
||||
public function __construct(protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory, private readonly Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/center/timeline",
|
||||
|
@@ -48,7 +48,9 @@ class UserController extends CRUDController
|
||||
private readonly TranslatorInterface $translator,
|
||||
private readonly ChillSecurity $security,
|
||||
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry
|
||||
) {}
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/admin/main/user/{uid}/add_link_groupcenter",
|
||||
@@ -276,7 +278,7 @@ class UserController extends CRUDController
|
||||
->build();
|
||||
}
|
||||
|
||||
protected function countEntities(string $action, Request $request, FilterOrderHelper $filterOrder = null): int
|
||||
protected function countEntities(string $action, Request $request, ?FilterOrderHelper $filterOrder = null): int
|
||||
{
|
||||
if (!$filterOrder instanceof FilterOrderHelper) {
|
||||
return parent::countEntities($action, $request, $filterOrder);
|
||||
@@ -289,7 +291,7 @@ class UserController extends CRUDController
|
||||
return $this->userRepository->countByUsernameOrEmail($filterOrder->getQueryString());
|
||||
}
|
||||
|
||||
protected function createFormFor(string $action, $entity, string $formClass = null, array $formOptions = []): FormInterface
|
||||
protected function createFormFor(string $action, $entity, ?string $formClass = null, array $formOptions = []): FormInterface
|
||||
{
|
||||
// for "new", add special config
|
||||
if ('new' === $action) {
|
||||
@@ -333,7 +335,7 @@ class UserController extends CRUDController
|
||||
Request $request,
|
||||
int $totalItems,
|
||||
PaginatorInterface $paginator,
|
||||
FilterOrderHelper $filterOrder = null
|
||||
?FilterOrderHelper $filterOrder = null
|
||||
) {
|
||||
if (0 === $totalItems) {
|
||||
return [];
|
||||
|
@@ -27,7 +27,8 @@ final readonly class UserExportController
|
||||
private UserRepositoryInterface $userRepository,
|
||||
private Security $security,
|
||||
private TranslatorInterface $translator,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \League\Csv\CannotInsertRecord
|
||||
|
@@ -21,7 +21,8 @@ class UserJobScopeHistoriesController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly Environment $engine,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/admin/main/user/{id}/job-scope-history", name="admin_user_job_scope_history")
|
||||
|
@@ -28,7 +28,8 @@ final class UserProfileController extends AbstractController
|
||||
private readonly TranslatorInterface $translator,
|
||||
private readonly ChillSecurity $security,
|
||||
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* User profile that allows editing of phonenumber and visualization of certain data.
|
||||
|
@@ -29,7 +29,9 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class WorkflowApiController
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer) {}
|
||||
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of workflow which are waiting an action for the user.
|
||||
|
@@ -38,7 +38,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class WorkflowController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly ValidatorInterface $validator, private readonly PaginatorFactory $paginatorFactory, private readonly Registry $registry, private readonly EntityManagerInterface $entityManager, private readonly TranslatorInterface $translator, private readonly ChillSecurity $security, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
|
||||
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly ValidatorInterface $validator, private readonly PaginatorFactory $paginatorFactory, private readonly Registry $registry, private readonly EntityManagerInterface $entityManager, private readonly TranslatorInterface $translator, private readonly ChillSecurity $security, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/main/workflow/create", name="chill_main_workflow_create")
|
||||
|
Reference in New Issue
Block a user