Neos\ContentRepository\Domain\Model\Node::setPathInternalForAggregate PHP Method

setPathInternalForAggregate() protected method

Moves a node and sub nodes to the new path given with special logic for aggregate node types.
protected setPathInternalForAggregate ( string $destinationPath, boolean $recursiveCall ) : array
$destinationPath string the new node path
$recursiveCall boolean is this a recursive call
return array of arrays with NodeVariant and old and new path and if this was a recursive call
    protected function setPathInternalForAggregate($destinationPath, $recursiveCall)
    {
        $originalPath = $this->nodeData->getPath();
        $nodeDataVariantsAndChildren = $this->nodeDataRepository->findByPathWithoutReduce($originalPath, $this->context->getWorkspace(), true, true);
        $changedNodePathsCollection = array_map(function ($nodeData) use($destinationPath, $originalPath, $recursiveCall) {
            return $this->moveNodeData($nodeData, $originalPath, $destinationPath, $recursiveCall);
        }, $nodeDataVariantsAndChildren);
        return array_filter($changedNodePathsCollection);
    }
Node