class SearchState

Properties

protected FilterInterface[] $activeFilters

Methods

__construct( User $actor, bool $fulltextSearch, array| Closure $defaultSort = [])

No description

getActor()

No description

array| Closure
getDefaultSort()

No description

void
setDefaultSort(array| Closure $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.

bool
isFulltextSearch()

No description

array
getActiveFilters()

Get a list of the filters that are active.

array
getListFilters()

The active filters that decide which list this is, leaving out those that only pick a window of it (`WindowFilterInterface`) or narrow it (`RefineFilterInterface`). With none, the request is the unfiltered list, such as the All Discussions page.

void
addActiveFilter( FilterInterface $filter)

No description

Details

final __construct( User $actor, bool $fulltextSearch, array| Closure $defaultSort = [])

Parameters

User $actor
bool $fulltextSearch
array| Closure $defaultSort

User getActor()

Return Value

User

array| Closure getDefaultSort()

Return Value

array| Closure

void setDefaultSort(array| Closure $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.

Parameters

array| Closure $defaultSort

Return Value

void

bool isFulltextSearch()

Return Value

bool

array getActiveFilters()

Get a list of the filters that are active.

To decide whether a request is the unfiltered list, such as the All Discussions page, use `getListFilters()` instead.

Return Value

array

array getListFilters()

The active filters that decide which list this is, leaving out those that only pick a window of it (`WindowFilterInterface`) or narrow it (`RefineFilterInterface`). With none, the request is the unfiltered list, such as the All Discussions page.

Return Value

array

void addActiveFilter( FilterInterface $filter)

Parameters

FilterInterface $filter

Return Value

void