SortScope
extends SortScope
in package
implements
HasAlphabetSort, HasFeatureSort
Uses
AlphabetSortTrait, FeatureSortTrait
Class SortScope.
Table of Contents
Interfaces
- HasAlphabetSort
- Interface HasAlphabetSort
- HasFeatureSort
- Interface HasFeatureSort
Constants
- SORT_ALPHABETICAL_COLUMN = 'title'
- SORT_DEFAULT = \MetaFox\Platform\Support\Browse\Browse::SORT_RECENT
- SORT_TYPE_DEFAULT = \MetaFox\Platform\Support\Browse\Browse::SORT_TYPE_DESC
Properties
Methods
- __construct() : mixed
- apply() : mixed
- applyAlphabetSort() : void
- applyFeatureSort() : void
- applyQueryBuilder() : void
- getAllowSort() : array<int, string>
- getAllowSortType() : array<int, string>
- getAlphabetSort() : string
- getAlphabetSortColumn() : string
- getFeatureSort() : string
- getFeatureSortColumn() : 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_ALPHABETICAL_COLUMN
public
mixed
SORT_ALPHABETICAL_COLUMN
= 'title'
SORT_DEFAULT
public
mixed
SORT_DEFAULT
= \MetaFox\Platform\Support\Browse\Browse::SORT_RECENT
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
applyAlphabetSort()
public
applyAlphabetSort(Builder $builder, Model $model) : void
Parameters
- $builder : Builder
- $model : Model
applyFeatureSort()
public
applyFeatureSort(Builder $builder, Model $model) : void
Parameters
- $builder : Builder
- $model : Model
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>getAlphabetSort()
public
getAlphabetSort() : string
Return values
stringgetAlphabetSortColumn()
public
getAlphabetSortColumn() : string
Return values
stringgetFeatureSort()
public
getFeatureSort() : string
Return values
stringgetFeatureSortColumn()
public
getFeatureSortColumn() : string
Return values
stringgetSort()
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