public function getUri($pageUid, $forceTsfe = false)
    {
        if (!isset($GLOBALS['TSFE'])) {
            if ($forceTsfe) {
                (new Tsfe)->create($this->getRootPage($pageUid));
            } else {
                throw new Exception('TSFE must be available to use this method');
            }
        }

        return $GLOBALS['TSFE']->cObj->typoLink_URL([
            'parameter' => $pageUid,
            'forceAbsoluteUrl' => true,
            'linkAccessRestrictedPages' => 1,
            'useCacheHash' => true
        ]);
    }
public function getUri($pageUid, $forceTsfe = false)
    {
        if (!isset($GLOBALS['TSFE'])) {
            if ($forceTsfe) {
                (new Tsfe)->create($this->getRootPage($pageUid));
            } else {
                throw new Exception('TSFE must be available to use this method');
            }
        }

        return $GLOBALS['TSFE']->cObj->typoLink_URL([
            'parameter' => $pageUid,
            'forceAbsoluteUrl' => true,
            'linkAccessRestrictedPages' => 1,
            'useCacheHash' => true
        ]);
    }
public function getUri ( $ pageUid , $ forceTsfe = false ) { if ( ! isset ( $ GLOBALS [ 'TSFE' ] ) ) { if ( $ forceTsfe ) { ( new Tsfe ) -> create ( $ this -> getRootPage ( $ pageUid ) ) ; } else { throw new Exception ( 'TSFE must be available to use this method' ) ; } } return $ GLOBALS [ 'TSFE' ] -> cObj -> typoLink_URL ( [ 'parameter' => $ pageUid , 'forceAbsoluteUrl' => true , 'linkAccessRestrictedPages' => 1 , 'useCacheHash' => true ] ) ; }
Convenience method for fetching the full URI to a page.

Uses TSFE and Typolink, so TSFE must be available. If no TSFE is available,
this method will attempt to bootstrap it if $forceTsfe is true.

@param  int  $pageUid  Page UID
@param  boolean  $forceTsfe  Attempt to bootstrap TSFE if unavailable. false by default
@return  string
@throws  \Exception  If no TSFE and did not bootstrap
Convenience method for fetching the full URI to a page .