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