/**
* returns whole path for given ContentNode.
*
* @param string $title title of new node
* @param string $parentPath parent path of new contentNode
* @param string $webspaceKey key of portal
* @param string $languageCode
* @param string $segmentKey
*
* @return string whole path
*/
public function generate($title, $parentPath, $webspaceKey, $languageCode, $segmentKey = null)
{
// title should not have a slash
$title = str_replace('/', '-', $title);
// get generated path from childClass
$path = $this->generatePath($title, $parentPath);
// cleanup path
$path = $this->cleaner->cleanup($path, $languageCode);
// get unique path
$path = $this->mapper->getUniquePath($path, $webspaceKey, $languageCode, $segmentKey);
return $path;
}