1 | <?php namespace Anomaly\DashboardModule\Widget\Form; |
||
14 | class WidgetFormBuilder extends FormBuilder |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * The widget instance. |
||
19 | * |
||
20 | * @var null|WidgetExtension |
||
21 | */ |
||
22 | protected $extension = null; |
||
23 | |||
24 | /** |
||
25 | * The dashboard instance. |
||
26 | * |
||
27 | * @var null|DashboardInterface |
||
28 | */ |
||
29 | protected $dashboard = null; |
||
30 | |||
31 | /** |
||
32 | * The skipped fields. |
||
33 | * |
||
34 | * @var array |
||
35 | */ |
||
36 | protected $skips = [ |
||
37 | 'extension', |
||
38 | 'column', |
||
39 | ]; |
||
40 | |||
41 | /** |
||
42 | * Fired when the form is ready to build. |
||
43 | * |
||
44 | * @throws \Exception |
||
45 | */ |
||
46 | public function onReady() |
||
52 | |||
53 | /** |
||
54 | * Fired just before saving the form. |
||
55 | */ |
||
56 | public function onSaving() |
||
65 | |||
66 | /** |
||
67 | * Get the extension. |
||
68 | * |
||
69 | * @return null|WidgetExtension |
||
70 | */ |
||
71 | public function getExtension() |
||
75 | |||
76 | /** |
||
77 | * Set the extension. |
||
78 | * |
||
79 | * @param WidgetExtension $extension |
||
80 | * @return $this |
||
81 | */ |
||
82 | public function setExtension(WidgetExtension $extension) |
||
88 | |||
89 | /** |
||
90 | * Get the dashboard. |
||
91 | * |
||
92 | * @return null|DashboardInterface |
||
93 | */ |
||
94 | public function getDashboard() |
||
98 | |||
99 | /** |
||
100 | * Set the dashboard. |
||
101 | * |
||
102 | * @param DashboardInterface $dashboard |
||
103 | * @return $this |
||
104 | */ |
||
105 | public function setDashboard(DashboardInterface $dashboard) |
||
111 | } |
||
112 |