From 87208614745730cacc070e18f6150ae218c07a8e Mon Sep 17 00:00:00 2001 From: roadiz-ci Date: Thu, 14 Mar 2024 13:15:11 +0000 Subject: [PATCH] chore: Deprecate Handlers methods --- src/Controllers/Nodes/NodesController.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Controllers/Nodes/NodesController.php b/src/Controllers/Nodes/NodesController.php index 193cdfaf..471bab83 100644 --- a/src/Controllers/Nodes/NodesController.php +++ b/src/Controllers/Nodes/NodesController.php @@ -566,10 +566,8 @@ public function emptyTrashAction(Request $request): Response /** @var Node|null $chroot */ $chroot = $this->nodeChrootResolver->getChroot($this->getUser()); if ($chroot !== null) { - /** @var NodeHandler $nodeHandler */ - $nodeHandler = $this->handlerFactory->getHandler($chroot); - $ids = $nodeHandler->getAllOffspringId(); - $criteria["parent"] = $ids; + $nodeRepository = $this->em()->getRepository(Node::class); + $criteria["parent"] = $nodeRepository->findAllOffspringIdByNode($chroot); } $nodes = $this->em()