Neos.ContentRepository/Classes/Domain/Service/NodeService.php
public function generateUniqueNodeName($parentPath, $idealNodeName = null)
    {
        $possibleNodeName = $this->generatePossibleNodeName($idealNodeName);

        while ($this->nodePathExistsInAnyContext(NodePaths::addNodePathSegment($parentPath, $possibleNodeName))) {
            $possibleNodeName = $this->generatePossibleNodeName();
        }

        return $possibleNodeName;
    }
public function generateUniqueNodeName($parentPath, $idealNodeName = null)
    {
        $possibleNodeName = $this->generatePossibleNodeName($idealNodeName);

        while ($this->nodePathExistsInAnyContext(NodePaths::addNodePathSegment($parentPath, $possibleNodeName))) {
            $possibleNodeName = $this->generatePossibleNodeName();
        }

        return $possibleNodeName;
    }
public function generateUniqueNodeName ( $ parentPath , $ idealNodeName = null ) { $ possibleNodeName = $ this -> generatePossibleNodeName ( $ idealNodeName ) ; while ( $ this -> nodePathExistsInAnyContext ( NodePaths :: addNodePathSegment ( $ parentPath , $ possibleNodeName ) ) ) { $ possibleNodeName = $ this -> generatePossibleNodeName ( ) ; } return $ possibleNodeName ; }
Generate a node name, optionally based on a suggested "ideal" name

@param string $parentPath
@param string $idealNodeName Can be any string, doesn't need to be a valid node name.
@return string
Generate a node name optionally based on a suggested ideal name