SideMenuModule::_CompareSort PHP Method

_CompareSort() protected method

b) Whether the item is after another. c) The order the item was added.
protected _CompareSort ( array $A, array $All ) : integer
$A array
$All array
return integer
        protected function _CompareSort($A, $All)
        {
            if (isset($A['Sort'])) {
                return $A['Sort'];
            }
            if (isset($A['After']) && isset($All[$A['After']])) {
                $After = $All[$A['After']];
                if (isset($After['Sort'])) {
                    return $After['Sort'] + 0.1;
                }
                return $After['_Sort'] + 0.1;
            }
            return $A['_Sort'];
        }