MetaFox

SortScope extends SortScope
in package

Class SortScope.

Table of Contents

Constants

SORT_CREATED_AT  = 'created_at'
SORT_DEFAULT  = self::SORT_FULL_NAME
SORT_FULL_NAME  = 'full_name'
SORT_GROUP  = 'group'
SORT_ID  = 'id'
SORT_IP_ADDRESS  = 'ip_address'
SORT_LAST_ACTIVITY  = 'last_activity'
SORT_LAST_LOGIN  = 'last_login'
SORT_TYPE_DEFAULT  = \MetaFox\Platform\Support\Browse\Browse::SORT_TYPE_DESC

Properties

$sort  : string
$sortType  : string

Methods

__construct()  : mixed
apply()  : mixed
applyQueryBuilder()  : void
getAllowSort()  : array<int, string>
getAllowSortType()  : array<int, string>
getDefaultSortType()  : string
getSort()  : string
getSortDefault()  : 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_CREATED_AT

public mixed SORT_CREATED_AT = 'created_at'

SORT_DEFAULT

public mixed SORT_DEFAULT = self::SORT_FULL_NAME

SORT_FULL_NAME

public mixed SORT_FULL_NAME = 'full_name'

SORT_GROUP

public mixed SORT_GROUP = 'group'

SORT_IP_ADDRESS

public mixed SORT_IP_ADDRESS = 'ip_address'

SORT_LAST_ACTIVITY

public mixed SORT_LAST_ACTIVITY = 'last_activity'

SORT_LAST_LOGIN

public mixed SORT_LAST_LOGIN = 'last_login'

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

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>

getDefaultSortType()

public static getDefaultSortType([string|null $sort = null ]) : string
Parameters
$sort : string|null = null
Return values
string

getSort()

public getSort() : string
Return values
string

getSortDefault()

public static getSortDefault() : string
Return values
string

getSortOptions()

public static getSortOptions() : array<int, array<string, string>>
Return values
array<int, array<string, string>>

getSortType()

public getSortType() : string
Return values
string

likeOperator()

return the case-insensitive LIKE operator bases on the current database driver.

public likeOperator() : string
Return values
string

rules()

public static rules() : array<string|int, string>
Return values
array<string|int, string>

setSort()

public setSort(string $sort) : self
Parameters
$sort : string
Return values
self

setSortType()

public setSortType(string $sortType) : self
Parameters
$sortType : string
Return values
self

sortTypes()

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
Return values
string

        
On this page

Search results