Copy $node before, into or after $targetNode
public copy ( Neos\ContentRepository\Domain\Model\NodeInterface $node, Neos\ContentRepository\Domain\Model\NodeInterface $targetNode, string $position, string $nodeName = null ) : Neos\ContentRepository\Domain\Model\NodeInterface | ||
$node | Neos\ContentRepository\Domain\Model\NodeInterface | the node to be copied |
$targetNode | Neos\ContentRepository\Domain\Model\NodeInterface | the target node to be copied "to", see $position |
$position | string | where the node should be added in relation to $targetNode (allowed: before, into, after) |
$nodeName | string | optional node name (if empty random node name will be generated) |
return | Neos\ContentRepository\Domain\Model\NodeInterface | The copied node |