public function getDefaultSortingDirection($field)
    {
        if (!empty($field) && is_string($field)) {
            switch ($field) {
                case 'sortdate':
                case 'score':
                    $orderBy = 'desc';
                    break;
                case 'title':
                default:
                    $orderBy = 'asc';
                    break;
            }
            return $orderBy;
        } else {
            return 'asc';
        }
    }
public function getDefaultSortingDirection($field)
    {
        if (!empty($field) && is_string($field)) {
            switch ($field) {
                case 'sortdate':
                case 'score':
                    $orderBy = 'desc';
                    break;
                case 'title':
                default:
                    $orderBy = 'asc';
                    break;
            }
            return $orderBy;
        } else {
            return 'asc';
        }
    }
public function getDefaultSortingDirection ( $ field ) { if ( ! empty ( $ field ) && is_string ( $ field ) ) { switch ( $ field ) { case 'sortdate' : case 'score' : $ orderBy = 'desc' ; break ; case 'title' : default : $ orderBy = 'asc' ; break ; } return $ orderBy ; } else { return 'asc' ; } }
get default sorting direction
f.e. default sorting for sortdate should be DESC. The most current records at first
f.e. default sorting for relevance should be DESC. The best relevance at first
f.e. default sorting for title should be ASC. Alphabetic order begins with A.
@param string The field name to sort by
@return string The default sorting (asc/desc) for given field
get default sorting direction f . e . default sorting for sortdate should be DESC . The most current records at first f . e . default sorting for relevance should be DESC . The best relevance at first f . e . default sorting for title should be ASC . Alphabetic order begins with A .