1 | <?php namespace Anomaly\DashboardModule\Widget\Extension; |
||
16 | class WidgetExtension extends Extension implements WidgetExtensionInterface |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * The widget view. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $view = null; |
||
25 | |||
26 | /** |
||
27 | * The contextual state. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $context = 'primary'; |
||
32 | |||
33 | /** |
||
34 | * The widget wrapper. |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $wrapper = 'anomaly.module.dashboard::admin/widgets/widget'; |
||
39 | |||
40 | /** |
||
41 | * Return the widget output. |
||
42 | * |
||
43 | * @param WidgetInterface $widget |
||
44 | * @return \Illuminate\Contracts\View\View |
||
45 | */ |
||
46 | public function output(WidgetInterface $widget) |
||
53 | |||
54 | /** |
||
55 | * Load the widget data. |
||
56 | * |
||
57 | * @param WidgetInterface $widget |
||
58 | */ |
||
59 | protected function load(WidgetInterface $widget) |
||
63 | |||
64 | /** |
||
65 | * Set the widget content. |
||
66 | * |
||
67 | * @param WidgetInterface $widget |
||
68 | */ |
||
69 | protected function content(WidgetInterface $widget) |
||
73 | |||
74 | /** |
||
75 | * Get the view. |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | public function getView() |
||
83 | |||
84 | /** |
||
85 | * Set the view. |
||
86 | * |
||
87 | * @param $view |
||
88 | * @return $this |
||
89 | */ |
||
90 | public function setView($view) |
||
96 | |||
97 | /** |
||
98 | * Get the wrapper. |
||
99 | * |
||
100 | * @return string |
||
101 | */ |
||
102 | public function getWrapper() |
||
106 | |||
107 | /** |
||
108 | * Set the wrapper. |
||
109 | * |
||
110 | * @param $wrapper |
||
111 | * @return $this |
||
112 | */ |
||
113 | public function setWrapper($wrapper) |
||
119 | |||
120 | /** |
||
121 | * Get the contextual state. |
||
122 | * |
||
123 | * @return string |
||
124 | */ |
||
125 | public function getContext() |
||
129 | |||
130 | /** |
||
131 | * Set the contextual state. |
||
132 | * |
||
133 | * @param $context |
||
134 | * @return $this |
||
135 | */ |
||
136 | public function setContext($context) |
||
142 | } |
||
143 |