Workspace NodeAggregateIdentifier::create(), // generate a new Identifier NodeTypeName::fromString('My.Package:MyNodeType'), OriginDimensionSpacePoint::fromDimensionSpacePoint($parentNode->getDimensionSpacePoint() // which language version to create? UserIdentifier::forSystemUser(), $parentNode->getNodeAggregateIdentifier(), // ID of parent node null, null, PropertyValuesToWrite::fromArray([ // Initial values 'myProperty' => 'myValue' ]) ); $commandResult = $this->nodeAggregateCommandHandler ->handleCreateNodeAggregateWithNode($command); // This will change in the future to $contentRepository->handle($command);
$commandResult->blockUntilProjectionsAreUpToDate();