class FilterState extends AbstractQueryState
Properties
protected Builder | $query | from AbstractQueryState | ||
protected User | $actor | from AbstractQueryState | ||
protected mixed | $defaultSort | from AbstractQueryState | ||
protected FilterInterface[] | $activeFilters |
Methods
Builder
getQuery()
<p>Get the query builder for the search results query.</p>
from AbstractQueryState
mixed
setDefaultSort(mixed $defaultSort)
<p>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.</p>
from AbstractQueryState
Details
in AbstractQueryState
at
line 36
__construct(Builder $query, User $actor, $defaultSort = [])
in AbstractQueryState
at
line 48
Builder
getQuery()
<p>Get the query builder for the search results query.</p>
in AbstractQueryState
at
line 58
User
getActor()
<p>Get the user who is performing the search.</p>
in AbstractQueryState
at
line 68
array
getDefaultSort()
<p>Get the default sort order for the search.</p>
in AbstractQueryState
at
line 83
mixed
setDefaultSort(mixed $defaultSort)
<p>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.</p>
at
line 26
FilterInterface[]
getActiveFilters()
<p>Get a list of the filters that are active.</p>
at
line 37
void
addActiveFilter(FilterInterface $filter)
<p>Add a filter as being active.</p>