1 | <?php namespace Anomaly\Streams\Platform\Ui\Table\Component\View; |
||
14 | class View implements ViewInterface |
||
15 | { |
||
16 | |||
17 | use FiresCallbacks; |
||
18 | |||
19 | /** |
||
20 | * The view slug. |
||
21 | * |
||
22 | * @var null|string |
||
23 | */ |
||
24 | protected $slug = null; |
||
25 | |||
26 | /** |
||
27 | * The view text. |
||
28 | * |
||
29 | * @var null|string |
||
30 | */ |
||
31 | protected $text = null; |
||
32 | |||
33 | /** |
||
34 | * The view icon. |
||
35 | * |
||
36 | * @var null|string |
||
37 | */ |
||
38 | protected $icon = null; |
||
39 | |||
40 | /** |
||
41 | * The active flag. |
||
42 | * |
||
43 | * @var bool |
||
44 | */ |
||
45 | protected $active = false; |
||
46 | |||
47 | /** |
||
48 | * The view prefix. |
||
49 | * |
||
50 | * @var string |
||
51 | */ |
||
52 | protected $prefix = null; |
||
53 | |||
54 | /** |
||
55 | * The attributes array. |
||
56 | * |
||
57 | * @var array |
||
58 | */ |
||
59 | protected $attributes = []; |
||
60 | |||
61 | /** |
||
62 | * The view filters. |
||
63 | * |
||
64 | * @var null |
||
65 | */ |
||
66 | protected $filters = null; |
||
67 | |||
68 | /** |
||
69 | * The view columns. |
||
70 | * |
||
71 | * @var null |
||
72 | */ |
||
73 | protected $columns = null; |
||
74 | |||
75 | /** |
||
76 | * The view buttons. |
||
77 | * |
||
78 | * @var null |
||
79 | */ |
||
80 | protected $buttons = null; |
||
81 | |||
82 | /** |
||
83 | * The view actions. |
||
84 | * |
||
85 | * @var null |
||
86 | */ |
||
87 | protected $actions = null; |
||
88 | |||
89 | /** |
||
90 | * The view options. |
||
91 | * |
||
92 | * @var null |
||
93 | */ |
||
94 | protected $options = null; |
||
95 | |||
96 | /** |
||
97 | * The view handler. |
||
98 | * |
||
99 | * @var callable|null|string |
||
100 | */ |
||
101 | protected $handler = null; |
||
102 | |||
103 | /** |
||
104 | * The view query. |
||
105 | * |
||
106 | * @var null|string|Closure |
||
107 | */ |
||
108 | protected $query = null; |
||
109 | |||
110 | /** |
||
111 | * Get the attributes. |
||
112 | * |
||
113 | * @return array |
||
114 | */ |
||
115 | public function getAttributes() |
||
119 | |||
120 | /** |
||
121 | * Set the attributes. |
||
122 | * |
||
123 | * @param array $attributes |
||
124 | * @return $this |
||
125 | */ |
||
126 | public function setAttributes(array $attributes) |
||
132 | |||
133 | /** |
||
134 | * Get the view handler. |
||
135 | * |
||
136 | * @return callable|null|string |
||
137 | */ |
||
138 | public function getHandler() |
||
142 | |||
143 | /** |
||
144 | * Set the view handler. |
||
145 | * |
||
146 | * @param $handler |
||
147 | * @return $this |
||
148 | */ |
||
149 | public function setHandler($handler) |
||
155 | |||
156 | /** |
||
157 | * Get the query. |
||
158 | * |
||
159 | * @return callable|null|string |
||
160 | */ |
||
161 | public function getQuery() |
||
165 | |||
166 | /** |
||
167 | * Set the query. |
||
168 | * |
||
169 | * @param $query |
||
170 | * @return $this |
||
171 | */ |
||
172 | public function setQuery($query) |
||
178 | |||
179 | /** |
||
180 | * Set the active flag. |
||
181 | * |
||
182 | * @param bool $active |
||
183 | * @return $this |
||
184 | */ |
||
185 | public function setActive($active) |
||
191 | |||
192 | /** |
||
193 | * Get the active flag. |
||
194 | * |
||
195 | * @return bool |
||
196 | */ |
||
197 | public function isActive() |
||
201 | |||
202 | /** |
||
203 | * Get the view prefix. |
||
204 | * |
||
205 | * @return string |
||
206 | */ |
||
207 | public function getPrefix() |
||
211 | |||
212 | /** |
||
213 | * Set the view prefix. |
||
214 | * |
||
215 | * @param $prefix |
||
216 | * @return $this |
||
217 | */ |
||
218 | public function setPrefix($prefix) |
||
224 | |||
225 | /** |
||
226 | * Get the view slug. |
||
227 | * |
||
228 | * @return string |
||
229 | */ |
||
230 | public function getSlug() |
||
234 | |||
235 | /** |
||
236 | * Set the view slug. |
||
237 | * |
||
238 | * @param $slug |
||
239 | * @return $this |
||
240 | */ |
||
241 | public function setSlug($slug) |
||
247 | |||
248 | /** |
||
249 | * Get the view text. |
||
250 | * |
||
251 | * @return string |
||
252 | */ |
||
253 | public function getText() |
||
257 | |||
258 | /** |
||
259 | * Set the view text. |
||
260 | * |
||
261 | * @param string $text |
||
262 | * @return $this |
||
263 | */ |
||
264 | public function setText($text) |
||
270 | |||
271 | /** |
||
272 | * Get the icon. |
||
273 | * |
||
274 | * @return null|string |
||
275 | */ |
||
276 | public function getIcon() |
||
280 | |||
281 | /** |
||
282 | * Set the icon. |
||
283 | * |
||
284 | * @param $icon |
||
285 | * @return $this |
||
286 | */ |
||
287 | public function setIcon($icon) |
||
293 | |||
294 | /** |
||
295 | * Get the filters. |
||
296 | * |
||
297 | * @return null|array |
||
298 | */ |
||
299 | public function getFilters() |
||
303 | |||
304 | /** |
||
305 | * Set the filters. |
||
306 | * |
||
307 | * @param $filters |
||
308 | * @return $this |
||
309 | */ |
||
310 | public function setFilters($filters) |
||
316 | |||
317 | /** |
||
318 | * Get the columns. |
||
319 | * |
||
320 | * @return null|array |
||
321 | */ |
||
322 | public function getColumns() |
||
326 | |||
327 | /** |
||
328 | * Set the columns. |
||
329 | * |
||
330 | * @param $columns |
||
331 | * @return $this |
||
332 | */ |
||
333 | public function setColumns($columns) |
||
339 | |||
340 | /** |
||
341 | * Get the buttons. |
||
342 | * |
||
343 | * @return null|array |
||
344 | */ |
||
345 | public function getButtons() |
||
349 | |||
350 | /** |
||
351 | * Set the buttons. |
||
352 | * |
||
353 | * @param $buttons |
||
354 | * @return $this |
||
355 | */ |
||
356 | public function setButtons($buttons) |
||
362 | |||
363 | /** |
||
364 | * Get the actions. |
||
365 | * |
||
366 | * @return null|array |
||
367 | */ |
||
368 | public function getActions() |
||
372 | |||
373 | /** |
||
374 | * Set the actions. |
||
375 | * |
||
376 | * @param $actions |
||
377 | * @return $this |
||
378 | */ |
||
379 | public function setActions($actions) |
||
385 | |||
386 | /** |
||
387 | * Get the options. |
||
388 | * |
||
389 | * @return null|array |
||
390 | */ |
||
391 | public function getOptions() |
||
395 | |||
396 | /** |
||
397 | * Set the options. |
||
398 | * |
||
399 | * @param $options |
||
400 | * @return $this |
||
401 | */ |
||
402 | public function setOptions($options) |
||
408 | } |
||
409 |