1 | <?php |
||
22 | class SettingsController extends ApiController { |
||
23 | private $userId; |
||
24 | private $settings; |
||
25 | |||
26 | public function __construct( |
||
27 | $AppName, |
||
28 | IRequest $request, |
||
29 | $userId, |
||
30 | SettingsService $settings, |
||
31 | IL10N $l) { |
||
32 | parent::__construct($AppName, $request); |
||
33 | $this->settings = $settings; |
||
34 | $this->l = $l; |
||
35 | $this->userId = $userId; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @return TemplateResponse |
||
40 | */ |
||
41 | 1 | public function getForm() { |
|
44 | |||
45 | /** |
||
46 | * @return string the section ID, e.g. 'sharing' |
||
47 | */ |
||
48 | public function getSection() { |
||
49 | return 'additional'; |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @return int whether the form should be rather on the top or bottom of |
||
54 | * the admin section. The forms are arranged in ascending order of the |
||
55 | * priority values. It is required to return a value between 0 and 100. |
||
56 | * |
||
57 | * E.g.: 70 |
||
58 | */ |
||
59 | 1 | public function getPriority() { |
|
62 | |||
63 | /** |
||
64 | * Get all settings |
||
65 | * |
||
66 | * @NoAdminRequired |
||
67 | * @NoCSRFRequired |
||
68 | */ |
||
69 | 1 | public function getSettings() { |
|
73 | |||
74 | /** |
||
75 | * Save a user setting |
||
76 | * |
||
77 | * @NoAdminRequired |
||
78 | * @NoCSRFRequired |
||
79 | */ |
||
80 | 1 | public function saveUserSetting($key, $value) { |
|
84 | |||
85 | |||
86 | /** |
||
87 | * Save a app setting |
||
88 | * |
||
89 | * @NoCSRFRequired |
||
90 | */ |
||
91 | 1 | public function saveAdminSetting($key, $value) { |
|
95 | |||
96 | } |