| 1 | <?php namespace Modules\Dashboard\Foundation\Widgets; |
||
| 3 | abstract class BaseWidget |
||
| 4 | { |
||
| 5 | /** |
||
| 6 | * Boot the widget and add the data to the dashboard view composer |
||
| 7 | */ |
||
| 8 | public function boot() |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Get the widget name |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | abstract protected function name(); |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Return an array of widget options |
||
| 36 | * Possible options: |
||
| 37 | * x, y, width, height |
||
| 38 | * @return array |
||
| 39 | */ |
||
| 40 | abstract protected function options(); |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Get the widget view |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | abstract protected function view(); |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Get the widget data to send to the view |
||
| 50 | * @return array |
||
| 51 | */ |
||
| 52 | abstract protected function data(); |
||
| 53 | } |
||
| 54 |