1 | <?php |
||
28 | class SettingsController extends BaseController |
||
29 | { |
||
30 | /** |
||
31 | * @Operation( |
||
32 | * tags={"settings"}, |
||
33 | * summary="Lists all settings", |
||
34 | * @SWG\Response( |
||
35 | * response="200", |
||
36 | * description="Returned on success.", |
||
37 | * @SWG\Schema( |
||
38 | * type="array", |
||
39 | * @SWG\Items(ref=@Model(type=\SWP\Bundle\CoreBundle\Model\Settings::class, groups={"api"})) |
||
40 | * ) |
||
41 | * ) |
||
42 | * ) |
||
43 | */ |
||
44 | public function listAction(): SingleResourceResponseInterface |
||
48 | |||
49 | /** |
||
50 | * @Operation( |
||
51 | * tags={"settings"}, |
||
52 | * summary="Revert settings to defaults by scope", |
||
53 | * @SWG\Response( |
||
54 | * response="204", |
||
55 | * description="Returned on success." |
||
56 | * ) |
||
57 | * ) |
||
58 | */ |
||
59 | public function revertAction(string $scope): SingleResourceResponseInterface |
||
63 | |||
64 | /** |
||
65 | * @Operation( |
||
66 | * tags={"settings"}, |
||
67 | * summary="Change setting value", |
||
68 | * @SWG\Parameter( |
||
69 | * name="body", |
||
70 | * in="body", |
||
71 | * @SWG\Schema( |
||
72 | * ref=@Model(type=SettingType::class) |
||
73 | * ) |
||
74 | * ), |
||
75 | * @SWG\Response( |
||
76 | * response="200", |
||
77 | * description="Returned on success.", |
||
78 | * @Model(type=\SWP\Bundle\CoreBundle\Model\Settings::class, groups={"api"}) |
||
79 | * ), |
||
80 | * @SWG\Response( |
||
81 | * response="404", |
||
82 | * description="Setting not found" |
||
83 | * ) |
||
84 | * ) |
||
85 | */ |
||
86 | public function updateAction(Request $request): SingleResourceResponseInterface |
||
90 | |||
91 | /** |
||
92 | * @Operation( |
||
93 | * tags={"settings"}, |
||
94 | * summary="Settings bulk update", |
||
95 | * @SWG\Parameter( |
||
96 | * name="body", |
||
97 | * in="body", |
||
98 | * @SWG\Schema( |
||
99 | * ref=@Model(type=BulkSettingsUpdateType::class) |
||
100 | * ) |
||
101 | * ), |
||
102 | * @SWG\Response( |
||
103 | * response="200", |
||
104 | * description="Returned on success.", |
||
105 | * @SWG\Schema( |
||
106 | * type="array", |
||
107 | * @SWG\Items(ref=@Model(type=\SWP\Bundle\CoreBundle\Model\Settings::class, groups={"api"})) |
||
108 | * ) |
||
109 | * ), |
||
110 | * @SWG\Response( |
||
111 | * response="404", |
||
112 | * description="Setting not found" |
||
113 | * ) |
||
114 | * ) |
||
115 | */ |
||
116 | public function bulkAction(Request $request): SingleResourceResponseInterface |
||
120 | } |
||
121 |