source/Application/Model/ArticleList.php
protected function _sortByOrderMapCallback($key1, $key2)
    {
        if (isset($this->_aOrderMap[$key1])) {
            if (isset($this->_aOrderMap[$key2])) {
                $iDiff = $this->_aOrderMap[$key2] - $this->_aOrderMap[$key1];
                if ($iDiff > 0) {
                    return -1;
                } elseif ($iDiff < 0) {
                    return 1;
                } else {
                    return 0;
                }
            } else {
                // first is here, but 2nd is not - 1st gets more priority
                return -1;
            }
        } elseif (isset($this->_aOrderMap[$key2])) {
            // first is not here, but 2nd is - 2nd gets more priority
            return 1;
        } else {
            // both unset, equal
            return 0;
        }
    }
protected function _sortByOrderMapCallback($key1, $key2)
    {
        if (isset($this->_aOrderMap[$key1])) {
            if (isset($this->_aOrderMap[$key2])) {
                $iDiff = $this->_aOrderMap[$key2] - $this->_aOrderMap[$key1];
                if ($iDiff > 0) {
                    return -1;
                } elseif ($iDiff < 0) {
                    return 1;
                } else {
                    return 0;
                }
            } else {
                // first is here, but 2nd is not - 1st gets more priority
                return -1;
            }
        } elseif (isset($this->_aOrderMap[$key2])) {
            // first is not here, but 2nd is - 2nd gets more priority
            return 1;
        } else {
            // both unset, equal
            return 0;
        }
    }
protected function _sortByOrderMapCallback ( $ key1 , $ key2 ) { if ( isset ( $ this -> _aOrderMap [ $ key1 ] ) ) { if ( isset ( $ this -> _aOrderMap [ $ key2 ] ) ) { $ iDiff = $ this -> _aOrderMap [ $ key2 ] - $ this -> _aOrderMap [ $ key1 ] ; if ( $ iDiff > 0 ) { return - 1 ; } elseif ( $ iDiff < 0 ) { return 1 ; } else { return 0 ; } } else { // first is here, but 2nd is not - 1st gets more priority return - 1 ; } } elseif ( isset ( $ this -> _aOrderMap [ $ key2 ] ) ) { // first is not here, but 2nd is - 2nd gets more priority return 1 ; } else { // both unset, equal return 0 ; } }
callback function only used from sortByIds

@param string $key1 1st key
@param string $key2 2nd key

@see oxArticleList::sortByIds

@return int
callback function only used from sortByIds