1 | <?php namespace Anomaly\DashboardModule\Http\Controller\Admin; |
||
20 | class WidgetsController extends AdminController |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * Display an index of existing entries. |
||
25 | * |
||
26 | * @param WidgetTableBuilder $table |
||
27 | * @return \Symfony\Component\HttpFoundation\Response |
||
28 | */ |
||
29 | public function index(WidgetTableBuilder $table) |
||
33 | |||
34 | /** |
||
35 | * Return the modal for choosing a widget. |
||
36 | * |
||
37 | * @param ExtensionCollection $extensions |
||
38 | * @return \Illuminate\Contracts\View\View|mixed |
||
39 | */ |
||
40 | public function choose(ExtensionCollection $extensions) |
||
41 | { |
||
42 | return $this->view->make( |
||
43 | 'module::admin/widgets/choose', |
||
44 | ['widgets' => $extensions->search('anomaly.module.dashboard::widget.*')] |
||
45 | ); |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * Create a new entry. |
||
50 | * |
||
51 | * @param ExtensionCollection $extensions |
||
52 | * @param WidgetExtensionFormBuilder|WidgetFormBuilder $form |
||
53 | * @param WidgetFormBuilder $widget |
||
54 | * @param ConfigurationFormBuilder $configuration |
||
55 | * @return \Symfony\Component\HttpFoundation\Response |
||
56 | */ |
||
57 | public function create( |
||
71 | |||
72 | /** |
||
73 | * Edit an existing entry. |
||
74 | * |
||
75 | * @param ExtensionCollection $extensions |
||
76 | * @param WidgetExtensionFormBuilder|WidgetFormBuilder $form |
||
77 | * @param WidgetFormBuilder $widget |
||
78 | * @param ConfigurationFormBuilder $configuration |
||
79 | * @return \Symfony\Component\HttpFoundation\Response |
||
80 | */ |
||
81 | public function edit( |
||
101 | |||
102 | public function save(WidgetRepositoryInterface $widgets) |
||
116 | } |
||
117 |