protected function sort(ModelCriteria $query, Request $request)
    {
        $order = $this->getSortOrder($request);

        foreach ($order as $setting) {
            $column = $setting[0];
            $direction = $setting[1];
            $query->orderBy($column, $direction);
        }

        return $query;
    }
protected function sort(ModelCriteria $query, Request $request)
    {
        $order = $this->getSortOrder($request);

        foreach ($order as $setting) {
            $column = $setting[0];
            $direction = $setting[1];
            $query->orderBy($column, $direction);
        }

        return $query;
    }
protected function sort ( ModelCriteria $ query , Request $ request ) { $ order = $ this -> getSortOrder ( $ request ) ; foreach ( $ order as $ setting ) { $ column = $ setting [ 0 ] ; $ direction = $ setting [ 1 ] ; $ query -> orderBy ( $ column , $ direction ) ; } return $ query ; }
Sorts the database records. This method should be considered final for
all practical purposes.

@param ModelCriteria $query the Propel query
@param Request $request the current request
@return ModelCriteria the Propel query
Sorts the database records . This method should be considered final for all practical purposes .