class FilterState extends AbstractQueryState
Properties
| protected Builder | $query | from AbstractQueryState |
|
|
| protected User | $actor | from AbstractQueryState |
|
|
| protected mixed | $defaultSort | from AbstractQueryState |
|
|
| protected FilterInterface[] | $activeFilters |
|
Methods
mixed
setDefaultSort(mixed $defaultSort)
Set the default sort order for the search. This will only be applied if a sort order has not been specified in the search criteria.
from AbstractQueryState
Details
in AbstractQueryState
at
line 36
__construct(Builder $query, User $actor, $defaultSort = [])
in AbstractQueryState
at
line 48
Builder
getQuery()
Get the query builder for the search results query.
in AbstractQueryState
at
line 58
User
getActor()
Get the user who is performing the search.
in AbstractQueryState
at
line 68
array
getDefaultSort()
Get the default sort order for the search.
in AbstractQueryState
at
line 83
mixed
setDefaultSort(mixed $defaultSort)
Set the default sort order for the search. This will only be applied if a sort order has not been specified in the search criteria.
at
line 26
FilterInterface[]
getActiveFilters()
Get a list of the filters that are active.
at
line 37
void
addActiveFilter(FilterInterface $filter)
Add a filter as being active.