public static function getFrontendUrl($rootPid, $typeNum)
    {
        $domain = self::getDomain($rootPid);
        if (!empty($domain)) {
            $domain = 'http://' . $domain . '/';
        } else {
            $domain = Typo3GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
        }
        $url = $domain . 'index.php?id=' . (int)$rootPid . '&type=' . (int)$typeNum;

        return $url;
    }