Skip to content

Commit

Permalink
Merge pull request #3434 from insiders/node-request
Browse files Browse the repository at this point in the history
[NodeBundle] Remove not needed request_stack
  • Loading branch information
acrobat authored Sep 13, 2024
2 parents c43a15c + dd80cf5 commit 0fe96c5
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()]);
Expand All @@ -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()]);
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -1159,7 +1155,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,
Expand Down

0 comments on commit 0fe96c5

Please sign in to comment.