SortScope
extends SortScope
in package
Class SortScope.
Table of Contents
Constants
- SORT_CURRENT_POINT = 'current_points'
- SORT_DEFAULT = self::SORT_FULL_NAME
- SORT_FULL_NAME = 'full_name'
- SORT_TYPE_DEFAULT = \MetaFox\Platform\Support\Browse\Browse::SORT_TYPE_DESC
Properties
Methods
- __construct() : mixed
- apply() : void
- applyQueryBuilder() : void
- getAllowSort() : array<int, string>
- getAllowSortType() : array<int, string>
- getSort() : string
- getSortOptions() : array<int, array<string, 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_CURRENT_POINT
public
mixed
SORT_CURRENT_POINT
= 'current_points'
SORT_DEFAULT
public
mixed
SORT_DEFAULT
= self::SORT_FULL_NAME
SORT_FULL_NAME
public
mixed
SORT_FULL_NAME
= 'full_name'
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) : 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>getSort()
public
getSort() : string
Return values
stringgetSortOptions()
public
static getSortOptions() : array<int, array<string, string>>
Return values
array<int, array<string, string>>getSortType()
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