SortScope
        
        extends SortScope
    
    
            
            in package
            
        
    
    
    
Class SortScope.
Table of Contents
Constants
- SORT_DEFAULT = \MetaFox\Platform\Support\Browse\Browse::SORT_RECENT
 - SORT_MOST_PHOTO = 'most_photo'
 - SORT_TYPE_DEFAULT = \MetaFox\Platform\Support\Browse\Browse::SORT_TYPE_DESC
 
Properties
Methods
- __construct() : mixed
 - apply() : mixed
 - applyQueryBuilder() : void
 - getAllowSort() : array<int, string>
 - getAllowSortType() : array<int, string>
 - getSort() : string
 - getSortType() : string
 - likeOperator() : string
 - return the case-insensitive LIKE operator bases on the current database driver.
 - rules() : array<string|int, string>
 - setSort() : self
 - setSortType() : self
 - sortTypes() : array<string|int, string>
 - alias() : string
 
Constants
SORT_DEFAULT
    public
        mixed
    SORT_DEFAULT
    = \MetaFox\Platform\Support\Browse\Browse::SORT_RECENT
    
    
    
SORT_MOST_PHOTO
    public
        mixed
    SORT_MOST_PHOTO
    = 'most_photo'
    
    
    
SORT_TYPE_DEFAULT
    public
        mixed
    SORT_TYPE_DEFAULT
    = \MetaFox\Platform\Support\Browse\Browse::SORT_TYPE_DESC
    
    
    
Properties
$sort
    private
        string
    $sort
     = self::SORT_DEFAULT
    
    
    
$sortType
    private
        string
    $sortType
     = self::SORT_TYPE_DEFAULT
    
    
    
Methods
__construct()
    public
                    __construct([string|null $sort = null ][, string|null $sortType = null ]) : mixed
    Parameters
- $sort : string|null = null
 - $sortType : string|null = null
 
apply()
    public
                    apply(Builder $builder, Model $model) : mixed
    Parameters
- $builder : Builder
 - $model : Model
 
Tags
applyQueryBuilder()
    public
                    applyQueryBuilder(Builder $builder) : void
    Parameters
- $builder : Builder
 
getAllowSort()
    public
            static        getAllowSort() : array<int, string>
    Return values
array<int, string>getAllowSortType()
    public
            static        getAllowSortType() : array<int, string>
    Return values
array<int, string>getSort()
    public
                    getSort() : string
    Return values
stringgetSortType()
    public
                    getSortType() : string
    Return values
stringlikeOperator()
return the case-insensitive LIKE operator bases on the current database driver.
    public
                    likeOperator() : string
    Return values
stringrules()
    public
            static        rules() : array<string|int, string>
    Return values
array<string|int, string>setSort()
    public
                    setSort(string $sort) : self
    Parameters
- $sort : string
 
Return values
selfsetSortType()
    public
                    setSortType(string $sortType) : self
    Parameters
- $sortType : string
 
Return values
selfsortTypes()
    public
            static        sortTypes() : array<string|int, string>
    Return values
array<string|int, string>alias()
    protected
                    alias(string $table, string $column) : string
    Parameters
- $table : string
 - $column : string