original_string: protected function getModelSortCriteria()
      {
          $sort = $this->getActualSort();
          $info = $this->getModelInformation();
  
          // Sort by orderable strategy if we should and can
          if (    $info->list->orderable
              &&  $sort == $info->list->getOrderableColumn()
              &&  ($orderableStrategy = $this->getOrderableSortStrategy())
          ) {
              return $orderableStrategy;
          }
  
          // Otherwise, attempt to sort by any other list column
          if ( ! isset($info->list->columns[$sort])) {
              return false;
          }
  
          $strategy = $info->list->columns[$sort]->sort_strategy;
          $source   = $info->list->columns[$sort]->source ?: $sort;
  
          return new ModelOrderStrategy($strategy, $source, $this->getActualSortDirection());
      }
code: protected function getModelSortCriteria()
      {
          $sort = $this->getActualSort();
          $info = $this->getModelInformation();
  
          // Sort by orderable strategy if we should and can
          if (    $info->list->orderable
              &&  $sort == $info->list->getOrderableColumn()
              &&  ($orderableStrategy = $this->getOrderableSortStrategy())
          ) {
              return $orderableStrategy;
          }
  
          // Otherwise, attempt to sort by any other list column
          if ( ! isset($info->list->columns[$sort])) {
              return false;
          }
  
          $strategy = $info->list->columns[$sort]->sort_strategy;
          $source   = $info->list->columns[$sort]->source ?: $sort;
  
          return new ModelOrderStrategy($strategy, $source, $this->getActualSortDirection());
      }
code_tokens: protected function getModelSortCriteria ( ) { $ sort = $ this -> getActualSort ( ) ; $ info = $ this -> getModelInformation ( ) ; // Sort by orderable strategy if we should and can if ( $ info -> list -> orderable && $ sort == $ info -> list -> getOrderableColumn ( ) && ( $ orderableStrategy = $ this -> getOrderableSortStrategy ( ) ) ) { return $ orderableStrategy ; } // Otherwise, attempt to sort by any other list column if ( ! isset ( $ info -> list -> columns [ $ sort ] ) ) { return false ; } $ strategy = $ info -> list -> columns [ $ sort ] -> sort_strategy ; $ source = $ info -> list -> columns [ $ sort ] -> source ? : $ sort ; return new ModelOrderStrategy ( $ strategy , $ source , $ this -> getActualSortDirection ( ) ) ; }
docstring: Returns the active model sorting criteria to apply to the model repository.
  
  @return ModelOrderStrategy|false
docstring_tokens: Returns the active model sorting criteria to apply to the model repository .