Neos.ContentRepository/Classes/Domain/Model/Node.php
protected function setPathInternal(string $destinationPath, bool $recursiveCall): array
    {
        if ($this->getNodeType()->isAggregate()) {
            return $this->setPathInternalForAggregate($destinationPath, $recursiveCall);
        }

        $originalPath = $this->nodeData->getPath();

        /** @var Node $childNode */
        foreach ($this->getChildNodes() as $childNode) {
            $childNode->setPath(NodePaths::addNodePathSegment($destinationPath, $childNode->getName()), false);
        }

        $this->moveNodeToDestinationPath($this, $destinationPath);

        return [
            [$this, $originalPath, $this->getNodeData()->getPath(), $recursiveCall]
        ];
    }
protected function setPathInternal(string $destinationPath, bool $recursiveCall): array
    {
        if ($this->getNodeType()->isAggregate()) {
            return $this->setPathInternalForAggregate($destinationPath, $recursiveCall);
        }

        $originalPath = $this->nodeData->getPath();

        /** @var Node $childNode */
        foreach ($this->getChildNodes() as $childNode) {
            $childNode->setPath(NodePaths::addNodePathSegment($destinationPath, $childNode->getName()), false);
        }

        $this->moveNodeToDestinationPath($this, $destinationPath);

        return [
            [$this, $originalPath, $this->getNodeData()->getPath(), $recursiveCall]
        ];
    }
protected function setPathInternal ( string $ destinationPath , bool $ recursiveCall ) : array { if ( $ this -> getNodeType ( ) -> isAggregate ( ) ) { return $ this -> setPathInternalForAggregate ( $ destinationPath , $ recursiveCall ) ; } $ originalPath = $ this -> nodeData -> getPath ( ) ; /** @var Node $childNode */ foreach ( $ this -> getChildNodes ( ) as $ childNode ) { $ childNode -> setPath ( NodePaths :: addNodePathSegment ( $ destinationPath , $ childNode -> getName ( ) ) , false ) ; } $ this -> moveNodeToDestinationPath ( $ this , $ destinationPath ) ; return [ [ $ this , $ originalPath , $ this -> getNodeData ( ) -> getPath ( ) , $ recursiveCall ] ] ; }
Moves a node and sub nodes to the new path.
This process is different depending on the fact if the node is an aggregate type or not.

@param string $destinationPath the new node path
@param boolean $recursiveCall is this a recursive call
@return array NodeVariants and old and new paths
@throws NodeException
@throws NodeTypeNotFoundException
Moves a node and sub nodes to the new path . This process is different depending on the fact if the node is an aggregate type or not .