SearchLimitTrait
Trait for working with sorting of search results.
Tags
Table of Contents
- $limitControlSelector : string
- Selector for limit control
- assertLimitControl() : void
- Assert the contents and selected element of the limit control.
- assertNoLimitControl() : void
- Assert that no limit control is present on the page.
- setResultLimit() : void
- Change sort order of search results
Properties
$limitControlSelector
Selector for limit control
protected
string
$limitControlSelector
= '#limit'
Methods
assertLimitControl()
Assert the contents and selected element of the limit control.
protected
assertLimitControl(Element $page, array<string|int, int> $options, int $active) : void
Parameters
- $page : Element
-
Current page
- $options : array<string|int, int>
-
Expected options
- $active : int
-
Expected active option
Return values
void —assertNoLimitControl()
Assert that no limit control is present on the page.
protected
assertNoLimitControl(Element $page) : void
Parameters
- $page : Element
-
Current page
Return values
void —setResultLimit()
Change sort order of search results
protected
setResultLimit(Element $page, int $value) : void
Parameters
- $page : Element
-
Current page
- $value : int
-
Limit option value