From dd80cf5f164dbf4540ff26145ca99a9918546a76 Mon Sep 17 00:00:00 2001 From: Danny van Wijk Date: Thu, 5 Sep 2024 09:43:30 +0200 Subject: [PATCH] Remove not needed request_stack --- src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php b/src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php index 9444fed8c6..dca57944b7 100644 --- a/src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php +++ b/src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php @@ -301,7 +301,6 @@ public function publishAction(Request $request, $id): RedirectResponse $node = $this->em->getRepository(Node::class)->find($id); $nodeTranslation = $node->getNodeTranslation($this->locale, true); - $request = $this->container->get('request_stack')->getCurrentRequest(); $this->nodePublisher->handlePublish($request, $nodeTranslation); return $this->redirectToRoute('KunstmaanNodeBundle_nodes_edit', ['id' => $node->getId()]); @@ -318,7 +317,6 @@ public function unPublishAction(Request $request, $id): RedirectResponse $node = $this->em->getRepository(Node::class)->find($id); $nodeTranslation = $node->getNodeTranslation($this->locale, true); - $request = $this->container->get('request_stack')->getCurrentRequest(); $this->nodePublisher->handleUnpublish($request, $nodeTranslation); return $this->redirectToRoute('KunstmaanNodeBundle_nodes_edit', ['id' => $node->getId()]); @@ -413,8 +411,6 @@ public function duplicateAction(Request $request, $id): RedirectResponse // Check with Acl $this->denyAccessUnlessGranted(PermissionMap::PERMISSION_EDIT, $originalNode); - $request = $this->container->get('request_stack')->getCurrentRequest(); - $originalNodeTranslations = $originalNode->getNodeTranslation($this->locale, true); $originalRef = $originalNodeTranslations->getPublicNodeVersion()->getRef($this->em); $newPage = $this->container->get('kunstmaan_admin.clone.helper') @@ -1153,7 +1149,6 @@ public static function getSubscribedServices(): array 'form.factory' => FormFactoryInterface::class, 'kunstmaan_adminlist.factory' => AdminListFactory::class, 'kunstmaan_admin.clone.helper' => CloneHelper::class, - 'request_stack' => RequestStack::class, 'kunstmaan_node.actions_menu_builder' => ActionsMenuBuilder::class, 'kunstmaan_node.admin_node.node_version_lock_helper' => NodeVersionLockHelper::class, 'translator' => TranslatorInterface::class,