PHP Class Devise\Support\Sortable\Sort

Afficher le fichier Open project: devisephp/cms Class Usage Examples

Protected Properties

Свойство Type Description
$Framework Devise\Support\Framework
$Input Illuminate\Http\Request
$Manager Manager
$defaultOrderBy array

Méthodes publiques

Méthode Description
__construct ( Manager $Manager, Framework $Framework )
clearSortLink ( string $label = 'Clear Sort', null $options = null ) : string
filter ( $filterName, $elementSelector, array $options = [] ) : string
handleFiltering ( QueryBuilder &$query, Eloquent $model ) : void We process filtering on this query if there is any $this->Input->get() found for dvs-filters this is used in Sortable\Database\Eloquent\Builder.paginate
handleSorting ( QueryBuilder &$query, Model $model ) : void Ads orderBy to the current query in builder
link ( $field, null $label = null, array $options = [] ) : string
setDefaultOrderBy ( string $field, string $dir = 'asc' ) : void Sets the default value of defaultOrderBy

Méthodes protégées

Méthode Description
appendSort ( &$query, $model, $sort ) : mixed
belongsTo ( $relation, $query, $model, $orderBy, $direction ) : mixed
getAliasedForeignKey ( $relation, $alias ) : string
get_random_string ( $length, string $valid_chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' ) : string
hasOne ( $relation, $query, $model, $orderBy, $direction ) : mixed
morphMany ( $relation, $query, $model, $orderBy, $direction ) : mixed
setSelectFromBindings ( $query, $model )
sortByDefault ( $query, $model ) : mixed

Method Details

__construct() public méthode

public __construct ( Manager $Manager, Framework $Framework )
$Manager Manager
$Framework Devise\Support\Framework

appendSort() protected méthode

protected appendSort ( &$query, $model, $sort ) : mixed
$query
$model
$sort
Résultat mixed

belongsTo() protected méthode

protected belongsTo ( $relation, $query, $model, $orderBy, $direction ) : mixed
$relation
$query
$model
$orderBy
$direction
Résultat mixed

filter() public méthode

public filter ( $filterName, $elementSelector, array $options = [] ) : string
$filterName
$elementSelector
$options array
Résultat string

getAliasedForeignKey() protected méthode

protected getAliasedForeignKey ( $relation, $alias ) : string
$relation
$alias
Résultat string

get_random_string() protected méthode

protected get_random_string ( $length, string $valid_chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' ) : string
$length
$valid_chars string
Résultat string

handleFiltering() public méthode

It's magic... really.
public handleFiltering ( QueryBuilder &$query, Eloquent $model ) : void
$query QueryBuilder
$model Eloquent
Résultat void

handleSorting() public méthode

Ads orderBy to the current query in builder
public handleSorting ( QueryBuilder &$query, Model $model ) : void
$query QueryBuilder
$model Model
Résultat void

hasOne() protected méthode

protected hasOne ( $relation, $query, $model, $orderBy, $direction ) : mixed
$relation
$query
$model
$orderBy
$direction
Résultat mixed

morphMany() protected méthode

protected morphMany ( $relation, $query, $model, $orderBy, $direction ) : mixed
$relation
$query
$model
$orderBy
$direction
Résultat mixed

setDefaultOrderBy() public méthode

Sets the default value of defaultOrderBy
public setDefaultOrderBy ( string $field, string $dir = 'asc' ) : void
$field string
$dir string
Résultat void

setSelectFromBindings() protected méthode

protected setSelectFromBindings ( $query, $model )
$query
$model

sortByDefault() protected méthode

protected sortByDefault ( $query, $model ) : mixed
$model
Résultat mixed

Property Details

$Framework protected_oe property

protected Framework,Devise\Support $Framework
Résultat Devise\Support\Framework

$Input protected_oe property

protected Request,Illuminate\Http $Input
Résultat Illuminate\Http\Request

$Manager protected_oe property

protected Manager,Devise\Support\Sortable $Manager
Résultat Manager

$defaultOrderBy protected_oe property

protected array $defaultOrderBy
Résultat array