Skip to content

Commit

Permalink
Dispatch ADD_NODE event on duplicate page
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny van Wijk committed Sep 5, 2024
1 parent a44ead7 commit c73d50e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,12 @@ public function duplicateAction(Request $request, $id): RedirectResponse

$this->aclManager->updateNodeAcl($originalNode, $nodeNewPage);

$nodeVersion = $nodeTranslation->getPublicNodeVersion();
$this->dispatch(
new NodeEvent($nodeNewPage, $nodeTranslation, $nodeVersion, $newPage),
Events::ADD_NODE
);

$this->addFlash(
FlashTypes::SUCCESS,
$this->container->get('translator')->trans('kuma_node.admin.duplicate.flash.success')
Expand Down

0 comments on commit c73d50e

Please sign in to comment.