diff --git a/Classes/ContentRepository/NodeTranslationService.php b/Classes/ContentRepository/NodeTranslationService.php index ca0658b..5c13484 100644 --- a/Classes/ContentRepository/NodeTranslationService.php +++ b/Classes/ContentRepository/NodeTranslationService.php @@ -392,6 +392,7 @@ public function syncNode(NodeInterface $sourceNode, string $workspaceName = 'liv } $this->recursionPreventionEnabled = false; + $targetNodes = []; foreach ($this->contentDimensionConfiguration[$this->languageDimensionName]['presets'] as $presetIdentifier => $languagePreset) { if ($nodeSourceDimensionValue === $presetIdentifier) { continue; @@ -431,6 +432,7 @@ public function syncNode(NodeInterface $sourceNode, string $workspaceName = 'liv $context->getFirstLevelNodeCache()->flush(); $this->publishingService->publishNode($targetNode); + $targetNodes[] = $targetNode; } else { $removeContext = $this->getContextForLanguageDimensionAndWorkspaceName($presetIdentifier, $workspaceName); $targetNode = $removeContext->getNodeByIdentifier($sourceNode->getIdentifier()); @@ -439,10 +441,24 @@ public function syncNode(NodeInterface $sourceNode, string $workspaceName = 'liv } } } - + $this->emitAfterNodeTranslated($sourceNode, $targetNodes, $workspaceName); $this->recursionPreventionEnabled = true; } + /** + * Signals that a node has been translated + * + * @Flow\Signal + * @api + * @param NodeInterface $sourceNode + * @param NodeInterface[] $targetNodes + * @param string $workspaceName + * @return void + */ + public function emitAfterNodeTranslated(NodeInterface $sourceNode, array $targetNodes, string $workspaceName): void + { + } + /** * @return bool */