protected function getRecordPageId($table, $uid)
    {
        $record = BackendUtility::getRecord($table, $uid, 'pid');
        return !empty($record['pid']) ? (int)$record['pid'] : 0;
    }
protected function getRecordPageId($table, $uid)
    {
        $record = BackendUtility::getRecord($table, $uid, 'pid');
        return !empty($record['pid']) ? (int)$record['pid'] : 0;
    }
protected function getRecordPageId ( $ table , $ uid ) { $ record = BackendUtility :: getRecord ( $ table , $ uid , 'pid' ) ; return ! empty ( $ record [ 'pid' ] ) ? ( int ) $ record [ 'pid' ] : 0 ; }
Returns the pageId of the record or 0 when no valid record was given.

@param string $table
@param integer $uid
@return mixed
Returns the pageId of the record or 0 when no valid record was given .