src/ShopBundle/objects/WebModules/MTShopArticleCatalogCore/MTShopArticleCatalogCoreEndPoint.class.php
public function ChangePageAjax($iListIdent = null)
    {
        $oResponse = new MTShopArticleListResponse();
        /** @var $oResponse MTShopArticleListResponse */
        if (null === $iListIdent) {
            $oGlobal = TGlobal::instance();
            $iListIdent = $oGlobal->GetUserData(TdbShopArticleList::URL_LIST_KEY_NAME);
        }

        $oListItem = $this->oList;
        if (null !== $oListItem) {
            $bViewNameExists = false;
            $bViewTypeExists = false;
            $bCallTimeVarsExists = false;

            $aItemRawData = TdbShopArticleList::GetInstanceDataFromSession($iListIdent);
            if (is_array($aItemRawData)) {
                $bViewNameExists = (array_key_exists('sViewName', $aItemRawData));
                $bViewTypeExists = (array_key_exists('sViewType', $aItemRawData));
                $bCallTimeVarsExists = (array_key_exists('aCallTimeVars', $aItemRawData));
            }
            if ($bViewNameExists && $bViewTypeExists && $bCallTimeVarsExists) {
                // fetch data for requested item
                $oResponse->iNumberOfResults = $oListItem->GetNumberOfRecordsForCurrentPage();
                $oResponse->bHasNextPage = $oListItem->HasNextPage();
                $oResponse->bHasPreviousPage = $oListItem->HasPreviousPage();
                $oResponse->sItemPage = $oListItem->Render($aItemRawData['sViewName'], $aItemRawData['sViewType'], $aItemRawData['aCallTimeVars']);
                $oResponse->iListKey = $iListIdent;
            }
        }

        $_SESSION['iLastPageNumber'] = $oListItem->GetCurrentPageNumber() - 1;

        return $oResponse;
    }
public function ChangePageAjax($iListIdent = null)
    {
        $oResponse = new MTShopArticleListResponse();
        /** @var $oResponse MTShopArticleListResponse */
        if (null === $iListIdent) {
            $oGlobal = TGlobal::instance();
            $iListIdent = $oGlobal->GetUserData(TdbShopArticleList::URL_LIST_KEY_NAME);
        }

        $oListItem = $this->oList;
        if (null !== $oListItem) {
            $bViewNameExists = false;
            $bViewTypeExists = false;
            $bCallTimeVarsExists = false;

            $aItemRawData = TdbShopArticleList::GetInstanceDataFromSession($iListIdent);
            if (is_array($aItemRawData)) {
                $bViewNameExists = (array_key_exists('sViewName', $aItemRawData));
                $bViewTypeExists = (array_key_exists('sViewType', $aItemRawData));
                $bCallTimeVarsExists = (array_key_exists('aCallTimeVars', $aItemRawData));
            }
            if ($bViewNameExists && $bViewTypeExists && $bCallTimeVarsExists) {
                // fetch data for requested item
                $oResponse->iNumberOfResults = $oListItem->GetNumberOfRecordsForCurrentPage();
                $oResponse->bHasNextPage = $oListItem->HasNextPage();
                $oResponse->bHasPreviousPage = $oListItem->HasPreviousPage();
                $oResponse->sItemPage = $oListItem->Render($aItemRawData['sViewName'], $aItemRawData['sViewType'], $aItemRawData['aCallTimeVars']);
                $oResponse->iListKey = $iListIdent;
            }
        }

        $_SESSION['iLastPageNumber'] = $oListItem->GetCurrentPageNumber() - 1;

        return $oResponse;
    }
public function ChangePageAjax ( $ iListIdent = null ) { $ oResponse = new MTShopArticleListResponse ( ) ; /** @var $oResponse MTShopArticleListResponse */ if ( null === $ iListIdent ) { $ oGlobal = TGlobal :: instance ( ) ; $ iListIdent = $ oGlobal -> GetUserData ( TdbShopArticleList :: URL_LIST_KEY_NAME ) ; } $ oListItem = $ this -> oList ; if ( null !== $ oListItem ) { $ bViewNameExists = false ; $ bViewTypeExists = false ; $ bCallTimeVarsExists = false ; $ aItemRawData = TdbShopArticleList :: GetInstanceDataFromSession ( $ iListIdent ) ; if ( is_array ( $ aItemRawData ) ) { $ bViewNameExists = ( array_key_exists ( 'sViewName' , $ aItemRawData ) ) ; $ bViewTypeExists = ( array_key_exists ( 'sViewType' , $ aItemRawData ) ) ; $ bCallTimeVarsExists = ( array_key_exists ( 'aCallTimeVars' , $ aItemRawData ) ) ; } if ( $ bViewNameExists && $ bViewTypeExists && $ bCallTimeVarsExists ) { // fetch data for requested item $ oResponse -> iNumberOfResults = $ oListItem -> GetNumberOfRecordsForCurrentPage ( ) ; $ oResponse -> bHasNextPage = $ oListItem -> HasNextPage ( ) ; $ oResponse -> bHasPreviousPage = $ oListItem -> HasPreviousPage ( ) ; $ oResponse -> sItemPage = $ oListItem -> Render ( $ aItemRawData [ 'sViewName' ] , $ aItemRawData [ 'sViewType' ] , $ aItemRawData [ 'aCallTimeVars' ] ) ; $ oResponse -> iListKey = $ iListIdent ; } } $ _SESSION [ 'iLastPageNumber' ] = $ oListItem -> GetCurrentPageNumber ( ) - 1 ; return $ oResponse ; }
send a paging signal to the list with iListIdent
since we changed the list to act on the signal on its own, we only need to return the
result here.

@param string $iListIdent

@return
send a paging signal to the list with iListIdent since we changed the list to act on the signal on its own we only need to return the result here .