1 | <?php |
||
8 | abstract class Filter implements FilterInterface |
||
9 | { |
||
10 | protected $type; |
||
11 | |||
12 | protected $value; |
||
13 | |||
14 | protected $name; |
||
15 | |||
16 | protected $title; |
||
17 | |||
18 | protected $defaultValue; |
||
19 | |||
20 | protected $operator = '='; |
||
21 | |||
22 | public function __construct($name, $title) |
||
26 | |||
27 | public function initialize() |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | public function apply(Builder $query) |
||
51 | |||
52 | /** |
||
53 | * Build the filter query. |
||
54 | * |
||
55 | * @param \Illuminate\Database\Eloquent\Builder $query |
||
56 | * @param string $name |
||
57 | */ |
||
58 | protected function buildQuery(Builder $query, $name) |
||
78 | |||
79 | protected function getRequestInputValue() |
||
85 | |||
86 | protected function getRequestName() |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function getValue() |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | public function getDisplayValue() |
||
111 | |||
112 | /** |
||
113 | * {@inheritdoc} |
||
114 | */ |
||
115 | public function setValue($value) |
||
121 | |||
122 | /** |
||
123 | * {@inheritdoc} |
||
124 | */ |
||
125 | public function getName() |
||
129 | |||
130 | /** |
||
131 | * {@inheritdoc} |
||
132 | */ |
||
133 | public function setName($name) |
||
139 | |||
140 | /** |
||
141 | * {@inheritdoc} |
||
142 | */ |
||
143 | public function getTitle() |
||
147 | |||
148 | /** |
||
149 | * {@inheritdoc} |
||
150 | */ |
||
151 | public function setTitle($title) |
||
157 | |||
158 | /** |
||
159 | * {@inheritdoc} |
||
160 | */ |
||
161 | public function getDefaultValue() |
||
165 | |||
166 | /** |
||
167 | * {@inheritdoc} |
||
168 | */ |
||
169 | public function setDefaultValue($defaultValue) |
||
175 | |||
176 | /** |
||
177 | * {@inheritdoc} |
||
178 | */ |
||
179 | public function getOperator() |
||
183 | |||
184 | /** |
||
185 | * {@inheritdoc} |
||
186 | */ |
||
187 | public function setOperator(string $operator) |
||
193 | |||
194 | public function isActive() |
||
198 | |||
199 | public function toArray() |
||
207 | |||
208 | public function jsonSerialize() |
||
212 | |||
213 | public function toJson($options = 0) |
||
217 | |||
218 | public function __toString() |
||
222 | } |
||
223 |