From 690d7fd31be26cbdfb3f1479e02ba0304fe00be4 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 12 Oct 2023 16:11:11 +0200 Subject: [PATCH] update documentation for global batch actions --- docs/crud/configuration.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/crud/configuration.md b/docs/crud/configuration.md index 4ca8589..7302b33 100644 --- a/docs/crud/configuration.md +++ b/docs/crud/configuration.md @@ -323,14 +323,15 @@ Do not use the same action in global and classic batch action. The callback can return a response. If not, the user will be redirect automatically. See the example below: ```php-inline -use App\Core\Entity\EntityInterface; +use App\Core\Entity\RepositoryQuery; use App\Core\Manager\EntityManager; +use Symfony\Component\HttpFoundation\JsonResponse; $configuration->setGlobalBatchAction( 'index', 'export_json', 'Export to JSON', - function(RepositoryQuery $query, EntityManager $manager, ?array $selection): ?Response { + function(RepositoryQuery $query, EntityManager $manager, ?array $selection): JsonResponse { $items = $selection ?? $query->find(); return $this->json($items);