Neos\ContentRepository\Domain\Model\Node::moveVariantOrChild PHP 메소드

moveVariantOrChild() 보호된 메소드

Moves the given variant or child node to the destination defined by the given path which is the new path for the originally moved (parent|variant) node
protected moveVariantOrChild ( string $aggregateOriginalPath, string $aggregateDestinationPath, Neos\ContentRepository\Domain\Model\NodeInterface $nodeToMove = null ) : array
$aggregateOriginalPath string
$aggregateDestinationPath string
$nodeToMove Neos\ContentRepository\Domain\Model\NodeInterface
리턴 array NodeVariant and old and new path
    protected function moveVariantOrChild($aggregateOriginalPath, $aggregateDestinationPath, NodeInterface $nodeToMove = null)
    {
        if ($nodeToMove === null) {
            return null;
        }
        $variantOriginalPath = $nodeToMove->getPath();
        $relativePathSegment = NodePaths::getRelativePathBetween($aggregateOriginalPath, $variantOriginalPath);
        $variantDestinationPath = NodePaths::addNodePathSegment($aggregateDestinationPath, $relativePathSegment);
        $this->moveNodeToDestinationPath($nodeToMove, $variantDestinationPath);
        return [$nodeToMove, $variantOriginalPath, $nodeToMove->getPath()];
    }
Node