1 | <?php |
||
8 | abstract class Filter implements FilterInterface |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $name; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $operator; |
||
19 | |||
20 | /** |
||
21 | * @var Column |
||
22 | */ |
||
23 | protected $column; |
||
24 | |||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $attr = []; |
||
29 | |||
30 | /** |
||
31 | * @param array $options |
||
32 | */ |
||
33 | public function __construct(array $options = []) |
||
37 | |||
38 | /** |
||
39 | * @inheritdoc |
||
40 | */ |
||
41 | public function getColumn() |
||
45 | |||
46 | /** |
||
47 | * @inheritdoc |
||
48 | */ |
||
49 | public function setColumn(Column $column) |
||
53 | |||
54 | /** |
||
55 | * @inheritdoc |
||
56 | */ |
||
57 | public function setOperator($operator) |
||
63 | |||
64 | /** |
||
65 | * @inheritdoc |
||
66 | */ |
||
67 | public function getOperator() |
||
71 | |||
72 | /** |
||
73 | * @inheritdoc |
||
74 | */ |
||
75 | public function setName(string $name) |
||
81 | |||
82 | /** |
||
83 | * @inheritdoc |
||
84 | */ |
||
85 | public function getName() |
||
89 | |||
90 | /** |
||
91 | * @return array |
||
92 | */ |
||
93 | public function getAttr(): array |
||
97 | |||
98 | /** |
||
99 | * @param array $attr |
||
100 | * @return $this |
||
101 | */ |
||
102 | public function setAttr(array $attr) |
||
108 | |||
109 | /** |
||
110 | * @inheritdoc |
||
111 | */ |
||
112 | public function isEmpty() |
||
120 | |||
121 | /** |
||
122 | * @return string|string[] |
||
123 | */ |
||
124 | public function getInput() |
||
128 | |||
129 | abstract public function render(); |
||
130 | |||
131 | /** |
||
132 | * @param array $options |
||
133 | */ |
||
134 | protected function setDefaultOptions(array $options) |
||
144 | |||
145 | /** |
||
146 | * @return \Collective\Html\HtmlBuilder |
||
147 | */ |
||
148 | protected function getHtmlBuilder() |
||
152 | |||
153 | /** |
||
154 | * @return \Collective\Html\FormBuilder |
||
155 | */ |
||
156 | protected function getFormBuilder() |
||
160 | |||
161 | /** |
||
162 | * @return \Illuminate\Http\Request |
||
163 | */ |
||
164 | protected function getRequest() |
||
168 | |||
169 | /** |
||
170 | * @return bool |
||
171 | */ |
||
172 | protected function hasInput() |
||
178 | |||
179 | /** |
||
180 | * HTTP POST or HTTP GET can't have dots in name. |
||
181 | * |
||
182 | * @param string $name |
||
183 | * @return string |
||
184 | */ |
||
185 | protected function normalizeName($name) |
||
189 | } |
||
190 |