1 | <?php |
||
7 | class SearchState |
||
8 | { |
||
9 | /** |
||
10 | * @var array |
||
11 | */ |
||
12 | protected $parsedQuery = []; |
||
13 | |||
14 | public function __construct(array $parsedQuery) |
||
23 | |||
24 | /** |
||
25 | * Add a link to the form which limits the search to the provided namespace |
||
26 | * |
||
27 | * @param Form $searchForm |
||
28 | * @param string $label |
||
29 | * @param string $ns namespace to which to limit the search, empty string to remove namespace limitation |
||
30 | */ |
||
31 | public function addSeachLinkNS(Form $searchForm, $label, $ns) |
||
38 | |||
39 | /** |
||
40 | * Add a link to the form which searches only for the provided words, but keeps the namespace and time limitations |
||
41 | * |
||
42 | * @param Form $searchForm |
||
43 | * @param string $label |
||
44 | * @param array $and |
||
45 | */ |
||
46 | public function addSearchLinkFragment(Form $searchForm, $label, array $and) |
||
52 | |||
53 | /** |
||
54 | * Add a link to the form which modifies the current search's time limitations |
||
55 | * |
||
56 | * @param Form $searchForm |
||
57 | * @param string $label |
||
58 | * @param string $after |
||
59 | * @param null|string $before |
||
60 | */ |
||
61 | public function addSearchLinkTime(Form $searchForm, $label, $after, $before = null) |
||
69 | |||
70 | /** |
||
71 | * Add a link to the form which sets the sort preference for the current search |
||
72 | * |
||
73 | * @param Form $searchForm |
||
74 | * @param string $label |
||
75 | * @param string $sort |
||
76 | */ |
||
77 | public function addSearchLinkSort(Form $searchForm, $label, $sort) |
||
84 | |||
85 | protected function addSearchLink( |
||
116 | } |
||
117 |