original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Get all available sort fields for the current controller action.
  
  @return array
docstring_tokens: Get all available sort fields for the current controller action .