diff --git a/src/CustomReport/Controller/Config/TreeController.php b/src/CustomReport/Controller/Config/TreeController.php index 41a6d325..7d5c6710 100644 --- a/src/CustomReport/Controller/Config/TreeController.php +++ b/src/CustomReport/Controller/Config/TreeController.php @@ -34,6 +34,7 @@ use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Security\Http\Attribute\IsGranted; use Symfony\Component\Serializer\SerializerInterface; +use function count; /** * @internal @@ -73,6 +74,7 @@ public function __construct( public function getCustomReports(): JsonResponse { $items = $this->customReportService->getCustomReportConfigTree(); + return $this->getPaginatedCollection($this->serializer, $items, count($items)); } } diff --git a/src/CustomReport/Controller/TreeController.php b/src/CustomReport/Controller/TreeController.php index 7809f2f1..9611f8ae 100644 --- a/src/CustomReport/Controller/TreeController.php +++ b/src/CustomReport/Controller/TreeController.php @@ -34,6 +34,7 @@ use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Security\Http\Attribute\IsGranted; use Symfony\Component\Serializer\SerializerInterface; +use function count; /** * @internal @@ -73,6 +74,7 @@ public function __construct( public function getCustomReports(): JsonResponse { $items = $this->customReportService->getCustomReportTree(); + return $this->getPaginatedCollection($this->serializer, $items, count($items)); } } diff --git a/src/CustomReport/Hydrator/CustomReportHydratorInterface.php b/src/CustomReport/Hydrator/CustomReportHydratorInterface.php index 25289e83..3bb05abe 100644 --- a/src/CustomReport/Hydrator/CustomReportHydratorInterface.php +++ b/src/CustomReport/Hydrator/CustomReportHydratorInterface.php @@ -24,6 +24,7 @@ interface CustomReportHydratorInterface { public function hydrateCustomReportTree(array $reports): array; + public function hydrateCustomReportConfigTree(array $reports): array; public function hydrateCustomReportDetails(Config $reportConfig): array; } diff --git a/src/CustomReport/Schema/CustomReportConfigTreeNode.php b/src/CustomReport/Schema/CustomReportConfigTreeNode.php index 4786d890..5c8df301 100644 --- a/src/CustomReport/Schema/CustomReportConfigTreeNode.php +++ b/src/CustomReport/Schema/CustomReportConfigTreeNode.php @@ -64,5 +64,4 @@ public function getWriteable(): string { return $this->writeable; } - } diff --git a/src/CustomReport/Service/CustomReportServiceInterface.php b/src/CustomReport/Service/CustomReportServiceInterface.php index 8384f244..3cf1b6f4 100644 --- a/src/CustomReport/Service/CustomReportServiceInterface.php +++ b/src/CustomReport/Service/CustomReportServiceInterface.php @@ -25,6 +25,7 @@ interface CustomReportServiceInterface { public function getCustomReportTree(): array; + public function getCustomReportConfigTree(): array; /**