src/ngrest/base/Plugin.php
public function getSortField()
    {
        if ($this->_sortField === false) {
            return [];
        }

        if ($this->_sortField) {
            // 
            if (is_array($this->_sortField)) {
                return [$this->name => $this->_sortField];
            } 

            return [$this->name => [
                'asc' => [$this->_sortField => SORT_ASC],
                'desc' => [$this->_sortField => SORT_DESC]
            ]];
        }
        
        return [$this->name];
    }
public function getSortField()
    {
        if ($this->_sortField === false) {
            return [];
        }

        if ($this->_sortField) {
            // 
            if (is_array($this->_sortField)) {
                return [$this->name => $this->_sortField];
            } 

            return [$this->name => [
                'asc' => [$this->_sortField => SORT_ASC],
                'desc' => [$this->_sortField => SORT_DESC]
            ]];
        }
        
        return [$this->name];
    }
public function getSortField ( ) { if ( $ this -> _sortField === false ) { return [ ] ; } if ( $ this -> _sortField ) { //  if ( is_array ( $ this -> _sortField ) ) { return [ $ this -> name => $ this -> _sortField ] ; } return [ $ this -> name => [ 'asc' => [ $ this -> _sortField => SORT_ASC ] , 'desc' => [ $ this -> _sortField => SORT_DESC ] ] ] ; } return [ $ this -> name ] ; }
Getter method for a sortField defintion.

If no sortField definition has been set, the plugin attribute name is used.

@return array
@since 2.0.0
Getter method for a sortField defintion .