final protected function sortToTop($value, $field, $array) {
        foreach($array as $key=>$item) {
            if($item->$field==$value) {
                unset($array[$key]);
                array_unshift($array, $item);
                break;
            }
        }
        
        return $array;
    }
final protected function sortToTop($value, $field, $array) {
        foreach($array as $key=>$item) {
            if($item->$field==$value) {
                unset($array[$key]);
                array_unshift($array, $item);
                break;
            }
        }
        
        return $array;
    }
final protected function sortToTop ( $ value , $ field , $ array ) { foreach ( $ array as $ key => $ item ) { if ( $ item -> $ field == $ value ) { unset ( $ array [ $ key ] ) ; array_unshift ( $ array , $ item ) ; break ; } } return $ array ; }
Sorts an item to the top of the list
@param {mixed} $value Value to look for
@param {mixed} $field Field to look on
@param {array} $array Array to sort
@return {array} Finalized array
Sorts an item to the top of the list