1 | <?php |
||
19 | class FilterState implements SerializableInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var bool True if filter is currently. |
||
23 | */ |
||
24 | private $active = false; |
||
25 | |||
26 | /** |
||
27 | * @var mixed Represents user selected value for filtering. |
||
28 | */ |
||
29 | private $value; |
||
30 | |||
31 | /** |
||
32 | * @var array Url parameters related *only* to given filter. |
||
33 | */ |
||
34 | private $urlParameters = []; |
||
35 | |||
36 | /** |
||
37 | * @var string Filter name. |
||
38 | */ |
||
39 | private $name; |
||
40 | |||
41 | /** |
||
42 | * @return bool |
||
43 | */ |
||
44 | public function isActive() |
||
48 | |||
49 | /** |
||
50 | * @param bool $active |
||
51 | */ |
||
52 | public function setActive($active) |
||
56 | |||
57 | /** |
||
58 | * @return mixed |
||
59 | */ |
||
60 | public function getValue() |
||
64 | |||
65 | /** |
||
66 | * @param mixed $value |
||
67 | */ |
||
68 | public function setValue($value) |
||
72 | |||
73 | /** |
||
74 | * @return array |
||
75 | */ |
||
76 | public function getUrlParameters() |
||
80 | |||
81 | /** |
||
82 | * @param array $urlParameters |
||
83 | */ |
||
84 | public function setUrlParameters(array $urlParameters) |
||
88 | |||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | public function getName() |
||
96 | |||
97 | /** |
||
98 | * @param string $name |
||
99 | */ |
||
100 | public function setName($name) |
||
104 | |||
105 | /** |
||
106 | * {@inheritdoc} |
||
107 | */ |
||
108 | public function getSerializableData() |
||
115 | } |
||
116 |