protected function _getSortFields()
    {
        $sortFields = [];

        foreach ($this->controller->sortFields as $field => $options) {
            if (isset($options['actions']) &&
                is_array($options['actions']) &&
                in_array($this->action, $options['actions'])
            ) {
                $sortFields[$field] = $options;
            }
        }

        return $sortFields;
    }
protected function _getSortFields()
    {
        $sortFields = [];

        foreach ($this->controller->sortFields as $field => $options) {
            if (isset($options['actions']) &&
                is_array($options['actions']) &&
                in_array($this->action, $options['actions'])
            ) {
                $sortFields[$field] = $options;
            }
        }

        return $sortFields;
    }
protected function _getSortFields ( ) { $ sortFields = [ ] ; foreach ( $ this -> controller -> sortFields as $ field => $ options ) { if ( isset ( $ options [ 'actions' ] ) && is_array ( $ options [ 'actions' ] ) && in_array ( $ this -> action , $ options [ 'actions' ] ) ) { $ sortFields [ $ field ] = $ options ; } } return $ sortFields ; }
Get all available sort fields for the current controller action.

@return array
Get all available sort fields for the current controller action .