source/Application/Controller/CompareController.php
protected function _changeArtListOrder($aItems, $oList)
    {
        // #777C changing order of list elements, according to $aItems
        $oNewList = [];
        $iCnt = 0;
        $iActPage = $this->getActPage();
        foreach ($aItems as $sOxid => $sVal) {
            //#4391T, skipping non loaded products
            if (!isset($oList[$sOxid])) {
                continue;
            }

            $iCnt++;
            $oNewList[$sOxid] = $oList[$sOxid];

            // hide arrow if article is first in the list
            $oNewList[$sOxid]->hidePrev = false;
            if ($iActPage == 0 && $iCnt == 1) {
                $oNewList[$sOxid]->hidePrev = true;
            }

            // hide arrow if article is last in the list
            $oNewList[$sOxid]->hideNext = false;
            if (($iActPage + 1) == $this->_iCntPages && $iCnt == count($aItems)) {
                $oNewList[$sOxid]->hideNext = true;
            }
        }

        return $oNewList;
    }
protected function _changeArtListOrder($aItems, $oList)
    {
        // #777C changing order of list elements, according to $aItems
        $oNewList = [];
        $iCnt = 0;
        $iActPage = $this->getActPage();
        foreach ($aItems as $sOxid => $sVal) {
            //#4391T, skipping non loaded products
            if (!isset($oList[$sOxid])) {
                continue;
            }

            $iCnt++;
            $oNewList[$sOxid] = $oList[$sOxid];

            // hide arrow if article is first in the list
            $oNewList[$sOxid]->hidePrev = false;
            if ($iActPage == 0 && $iCnt == 1) {
                $oNewList[$sOxid]->hidePrev = true;
            }

            // hide arrow if article is last in the list
            $oNewList[$sOxid]->hideNext = false;
            if (($iActPage + 1) == $this->_iCntPages && $iCnt == count($aItems)) {
                $oNewList[$sOxid]->hideNext = true;
            }
        }

        return $oNewList;
    }
protected function _changeArtListOrder ( $ aItems , $ oList ) { // #777C changing order of list elements, according to $aItems $ oNewList = [ ] ; $ iCnt = 0 ; $ iActPage = $ this -> getActPage ( ) ; foreach ( $ aItems as $ sOxid => $ sVal ) { //#4391T, skipping non loaded products if ( ! isset ( $ oList [ $ sOxid ] ) ) { continue ; } $ iCnt ++ ; $ oNewList [ $ sOxid ] = $ oList [ $ sOxid ] ; // hide arrow if article is first in the list $ oNewList [ $ sOxid ] -> hidePrev = false ; if ( $ iActPage == 0 && $ iCnt == 1 ) { $ oNewList [ $ sOxid ] -> hidePrev = true ; } // hide arrow if article is last in the list $ oNewList [ $ sOxid ] -> hideNext = false ; if ( ( $ iActPage + 1 ) == $ this -> _iCntPages && $ iCnt == count ( $ aItems ) ) { $ oNewList [ $ sOxid ] -> hideNext = true ; } } return $ oNewList ; }
Changes order of list elements

@param array  $aItems article array
@param object $oList  article list array

@return array $oNewList
Changes order of list elements