Devise
Class

Devise\Support\Sortable\Sort

class Sort

Class Sort handles creating links and filters for us which

Methods

__construct(Manager $Manager, Framework $Framework)

string link($field $field, null $label = null, array $options = array())

string clearSortLink(string $label = 'Clear Sort', null $options = null)

string filter($filterName $filterName, $elementSelector $elementSelector, array $options = array())

void setDefaultOrderBy(string $field, string $dir = 'asc')

Sets the default value of defaultOrderBy

void handleSorting(QueryBuilder $query, Model $model)

Ads orderBy to the current query in builder

void handleFiltering(QueryBuilder $query, Eloquent $model)

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

Details

at line 36
public __construct(Manager $Manager, Framework $Framework)

Parameters

Manager $Manager
Framework $Framework

Parameters

$field $field
null $label
array $options

Return Value

string

Parameters

string $label
null $options

Return Value

string

at line 73
public string filter($filterName $filterName, $elementSelector $elementSelector, array $options = array())

Parameters

$filterName $filterName
$elementSelector $elementSelector
array $options

Return Value

string

at line 86
public void setDefaultOrderBy(string $field, string $dir = 'asc')

Sets the default value of defaultOrderBy

Parameters

string $field
string $dir

Return Value

void

at line 98
public void handleSorting(QueryBuilder $query, Model $model)

Ads orderBy to the current query in builder

Parameters

QueryBuilder $query
Model $model

Return Value

void

at line 139
public void handleFiltering(QueryBuilder $query, Eloquent $model)

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

It's magic... really.

Parameters

QueryBuilder $query
Eloquent $model

Return Value

void