protected function getRootPageIdByTableAndUid($table, $uid)
    {
        if ($table === 'pages') {
            $rootPageId = $this->getRootPageId($uid);
            return $rootPageId;
        } else {
            $recordPageId = $this->getRecordPageId($table, $uid);
            $rootPageId = $this->getRootPageId($recordPageId, true);
            return $rootPageId;
        }
    }