src/ShopBundle/objects/db/TShopArticleList.class.php
public function RestorePagingInfoFromSession($iStartRecord, $iPageSize)
    {
        $identKey = $this->GetListIdentKey();
        $aTmpData = TdbShopArticleList::GetInstanceDataFromSession($identKey);
        $bPagingWasRestoredFromSession = false;
        if (!is_null($aTmpData)) {
            $bPagingWasRestoredFromSession = $this->SetPagingInfo($aTmpData['iStartRecord'], $aTmpData['iPageSize']);
        }
        if (false === $bPagingWasRestoredFromSession) {
            // use default... BUT if there is a post request for this list (ie list key given) and a page
            // is transfered, we use it
            $oGlobal = TGlobal::instance();
            $sRequestKey = $oGlobal->GetUserData(TdbShopArticleList::URL_LIST_KEY_NAME);
            if ($sRequestKey == $identKey) {
                $iRequestStartPage = $oGlobal->GetUserData(TdbShopArticleList::URL_LIST_CURRENT_PAGE);
                $iRequestStartPage = intval($iRequestStartPage);
                if ($iRequestStartPage > 0) {
                    $iStartRecord = $iPageSize * ($iRequestStartPage - 1);
                }
                $this->SetPagingInfo($iStartRecord, $iPageSize);
                $sRequest = $oGlobal->GetUserData(TdbShopArticleList::URL_LIST_REQUEST);
                $this->HandleURLRequest($sRequest);
            } else {
                if (false === $this->SetPagingInfo($iStartRecord, $iPageSize)) {
                    $this->SetPagingInfo(0, $iPageSize);
                }
            }
        }
    }
public function RestorePagingInfoFromSession($iStartRecord, $iPageSize)
    {
        $identKey = $this->GetListIdentKey();
        $aTmpData = TdbShopArticleList::GetInstanceDataFromSession($identKey);
        $bPagingWasRestoredFromSession = false;
        if (!is_null($aTmpData)) {
            $bPagingWasRestoredFromSession = $this->SetPagingInfo($aTmpData['iStartRecord'], $aTmpData['iPageSize']);
        }
        if (false === $bPagingWasRestoredFromSession) {
            // use default... BUT if there is a post request for this list (ie list key given) and a page
            // is transfered, we use it
            $oGlobal = TGlobal::instance();
            $sRequestKey = $oGlobal->GetUserData(TdbShopArticleList::URL_LIST_KEY_NAME);
            if ($sRequestKey == $identKey) {
                $iRequestStartPage = $oGlobal->GetUserData(TdbShopArticleList::URL_LIST_CURRENT_PAGE);
                $iRequestStartPage = intval($iRequestStartPage);
                if ($iRequestStartPage > 0) {
                    $iStartRecord = $iPageSize * ($iRequestStartPage - 1);
                }
                $this->SetPagingInfo($iStartRecord, $iPageSize);
                $sRequest = $oGlobal->GetUserData(TdbShopArticleList::URL_LIST_REQUEST);
                $this->HandleURLRequest($sRequest);
            } else {
                if (false === $this->SetPagingInfo($iStartRecord, $iPageSize)) {
                    $this->SetPagingInfo(0, $iPageSize);
                }
            }
        }
    }
public function RestorePagingInfoFromSession ( $ iStartRecord , $ iPageSize ) { $ identKey = $ this -> GetListIdentKey ( ) ; $ aTmpData = TdbShopArticleList :: GetInstanceDataFromSession ( $ identKey ) ; $ bPagingWasRestoredFromSession = false ; if ( ! is_null ( $ aTmpData ) ) { $ bPagingWasRestoredFromSession = $ this -> SetPagingInfo ( $ aTmpData [ 'iStartRecord' ] , $ aTmpData [ 'iPageSize' ] ) ; } if ( false === $ bPagingWasRestoredFromSession ) { // use default... BUT if there is a post request for this list (ie list key given) and a page // is transfered, we use it $ oGlobal = TGlobal :: instance ( ) ; $ sRequestKey = $ oGlobal -> GetUserData ( TdbShopArticleList :: URL_LIST_KEY_NAME ) ; if ( $ sRequestKey == $ identKey ) { $ iRequestStartPage = $ oGlobal -> GetUserData ( TdbShopArticleList :: URL_LIST_CURRENT_PAGE ) ; $ iRequestStartPage = intval ( $ iRequestStartPage ) ; if ( $ iRequestStartPage > 0 ) { $ iStartRecord = $ iPageSize * ( $ iRequestStartPage - 1 ) ; } $ this -> SetPagingInfo ( $ iStartRecord , $ iPageSize ) ; $ sRequest = $ oGlobal -> GetUserData ( TdbShopArticleList :: URL_LIST_REQUEST ) ; $ this -> HandleURLRequest ( $ sRequest ) ; } else { if ( false === $ this -> SetPagingInfo ( $ iStartRecord , $ iPageSize ) ) { $ this -> SetPagingInfo ( 0 , $ iPageSize ) ; } } } }
set the paging info from session.. if no value is set in session, use the passed values.

@param int $iStartRecord
@param int $iPageSize
set the paging info from session .. if no value is set in session use the passed values .