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'];
    }