Classes/Utility/RootPageUtility.php
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;
    }
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;
    }
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 ; }
Build a frontend url

@param integer $rootPid Root Page ID
@param integer $typeNum Type num

@return string
Build a frontend url