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

isNodePathAvailable() protected method

Checks if the given node path is available for this node, so either no node with this path exists or an existing node has the same identifier.
protected isNodePathAvailable ( string $path ) : boolean
$path string
return boolean
    protected function isNodePathAvailable($path)
    {
        $existingNodeDataArray = $this->nodeDataRepository->findByPathWithoutReduce($path, $this->context->getWorkspace());
        $nonMatchingNodeData = array_filter($existingNodeDataArray, function (NodeData $nodeData) {
            return $nodeData->getIdentifier() !== $this->getIdentifier();
        });
        return $nonMatchingNodeData === [];
    }
Node