From 132dbd64e7ea6998f63061821e69cd2dd624b557 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Thu, 14 Mar 2024 21:05:53 +0100 Subject: [PATCH] TASK: Adjust to workspace aware commands --- Classes/Domain/NodeCreation/NodeCreationCommands.php | 4 ++-- .../CreationDialog/PromotedElementsCreationHandlerFactory.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Domain/NodeCreation/NodeCreationCommands.php b/Classes/Domain/NodeCreation/NodeCreationCommands.php index aa761dac28..b5d967bed2 100644 --- a/Classes/Domain/NodeCreation/NodeCreationCommands.php +++ b/Classes/Domain/NodeCreation/NodeCreationCommands.php @@ -59,7 +59,7 @@ * Add a list of commands that are executed after the initial created command was run. * This allows to create child-nodes and append other allowed commands. * - * @var array + * @var array */ public array $additionalCommands; @@ -68,7 +68,7 @@ private function __construct( CreateNodeAggregateWithNode|SetNodeProperties|DisableNodeAggregate|EnableNodeAggregate|SetNodeReferences|CopyNodesRecursively ...$additionalCommands ) { $this->first = $first; - $this->additionalCommands = $additionalCommands; + $this->additionalCommands = array_values($additionalCommands); } /** diff --git a/Classes/Infrastructure/ContentRepository/CreationDialog/PromotedElementsCreationHandlerFactory.php b/Classes/Infrastructure/ContentRepository/CreationDialog/PromotedElementsCreationHandlerFactory.php index 8f63f272ca..64993e8359 100644 --- a/Classes/Infrastructure/ContentRepository/CreationDialog/PromotedElementsCreationHandlerFactory.php +++ b/Classes/Infrastructure/ContentRepository/CreationDialog/PromotedElementsCreationHandlerFactory.php @@ -61,7 +61,7 @@ public function handle(NodeCreationCommands $commands, NodeCreationElements $ele ) { // a promoted element $setReferencesCommands[] = SetNodeReferences::create( - $commands->first->contentStreamId, + $commands->first->workspaceName, $commands->first->nodeAggregateId, $commands->first->originDimensionSpacePoint, ReferenceName::fromString($elementName),