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;
        }
    }
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;
        }
    }
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 ; } }
This method checks if the record is a pages record or another one and determines the rootPageId from the records
rootline.

@param string $table
@param int $uid
@return int
This method checks if the record is a pages record or another one and determines the rootPageId from the records rootline .