src/Common/Model/Base.php
protected function sortItemsByColumn(array $aItems, array $aInputOrder, $sColumn)
    {
        $aOut = [];
        foreach ($aInputOrder as $sInputItem) {
            foreach ($aItems as $oItem) {
                if ($oItem->{$sColumn} == $sInputItem) {
                    $aOut[] = $oItem;
                }
            }
        }
        return $aOut;
    }
protected function sortItemsByColumn(array $aItems, array $aInputOrder, $sColumn)
    {
        $aOut = [];
        foreach ($aInputOrder as $sInputItem) {
            foreach ($aItems as $oItem) {
                if ($oItem->{$sColumn} == $sInputItem) {
                    $aOut[] = $oItem;
                }
            }
        }
        return $aOut;
    }
protected function sortItemsByColumn ( array $ aItems , array $ aInputOrder , $ sColumn ) { $ aOut = [ ] ; foreach ( $ aInputOrder as $ sInputItem ) { foreach ( $ aItems as $ oItem ) { if ( $ oItem -> { $ sColumn } == $ sInputItem ) { $ aOut [ ] = $ oItem ; } } } return $ aOut ; }
Sorts items into a specific order based on a specific column

@param array  $aItems      The items to sort
@param array  $aInputOrder The order to sort them in
@param string $sColumn     The column to sort on

@return array
Sorts items into a specific order based on a specific column