public function getRootPage($pageUid)
    {
        $info = $this->getPageInfo($pageUid);

        while ($info && $info['pid'] && !$info['is_siteroot']) {
            $info = $this->getPageInfo((int) $info['pid']);
        }

        return (int) $info['uid'];
    }
public function getRootPage($pageUid)
    {
        $info = $this->getPageInfo($pageUid);

        while ($info && $info['pid'] && !$info['is_siteroot']) {
            $info = $this->getPageInfo((int) $info['pid']);
        }

        return (int) $info['uid'];
    }
public function getRootPage ( $ pageUid ) { $ info = $ this -> getPageInfo ( $ pageUid ) ; while ( $ info && $ info [ 'pid' ] && ! $ info [ 'is_siteroot' ] ) { $ info = $ this -> getPageInfo ( ( int ) $ info [ 'pid' ] ) ; } return ( int ) $ info [ 'uid' ] ; }
Get the root page UID of the given page.

@param  int  $pageUid  Page UID to get root page for
@return  int  Root page UID
Get the root page UID of the given page .