| @@ 31-72 (lines=42) @@ | ||
| 28 | use OCP\IConfig; |
|
| 29 | use OCP\Settings\ISettings; |
|
| 30 | ||
| 31 | class AdminSettings implements ISettings { |
|
| 32 | ||
| 33 | /** @var IConfig */ |
|
| 34 | private $config; |
|
| 35 | /** @var \OC_Defaults */ |
|
| 36 | private $defaults; |
|
| 37 | ||
| 38 | public function __construct(IConfig $config, \OC_Defaults $defaults) { |
|
| 39 | $this->config = $config; |
|
| 40 | $this->defaults = $defaults; |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @return TemplateResponse returns the instance with all parameters set, ready to be rendered |
|
| 45 | * @since 9.1 |
|
| 46 | */ |
|
| 47 | public function getForm() { |
|
| 48 | $response = \OC::$server->query(\OCA\AppOrder\Controller\SettingsController::class)->adminIndex(); |
|
| 49 | return $response; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @return string the section ID, e.g. 'sharing' |
|
| 54 | * @since 9.1 |
|
| 55 | */ |
|
| 56 | public function getSection() { |
|
| 57 | return 'apporder'; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @return int whether the form should be rather on the top or bottom of |
|
| 62 | * the admin section. The forms are arranged in ascending order of the |
|
| 63 | * priority values. It is required to return a value between 0 and 100. |
|
| 64 | * |
|
| 65 | * E.g.: 70 |
|
| 66 | * @since 9.1 |
|
| 67 | */ |
|
| 68 | public function getPriority() { |
|
| 69 | return 90; |
|
| 70 | } |
|
| 71 | ||
| 72 | } |
|
| 73 | ||
| @@ 31-72 (lines=42) @@ | ||
| 28 | use OCP\IConfig; |
|
| 29 | use OCP\Settings\ISettings; |
|
| 30 | ||
| 31 | class PersonalSettings implements ISettings { |
|
| 32 | ||
| 33 | /** @var IConfig */ |
|
| 34 | private $config; |
|
| 35 | /** @var \OC_Defaults */ |
|
| 36 | private $defaults; |
|
| 37 | ||
| 38 | public function __construct(IConfig $config, \OC_Defaults $defaults) { |
|
| 39 | $this->config = $config; |
|
| 40 | $this->defaults = $defaults; |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @return TemplateResponse returns the instance with all parameters set, ready to be rendered |
|
| 45 | * @since 9.1 |
|
| 46 | */ |
|
| 47 | public function getForm() { |
|
| 48 | $response = \OC::$server->query(\OCA\AppOrder\Controller\SettingsController::class)->personalIndex(); |
|
| 49 | return $response; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @return string the section ID, e.g. 'sharing' |
|
| 54 | * @since 9.1 |
|
| 55 | */ |
|
| 56 | public function getSection() { |
|
| 57 | return 'apporder'; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * @return int whether the form should be rather on the top or bottom of |
|
| 62 | * the admin section. The forms are arranged in ascending order of the |
|
| 63 | * priority values. It is required to return a value between 0 and 100. |
|
| 64 | * |
|
| 65 | * E.g.: 70 |
|
| 66 | * @since 9.1 |
|
| 67 | */ |
|
| 68 | public function getPriority() { |
|
| 69 | return 90; |
|
| 70 | } |
|
| 71 | ||
| 72 | } |
|
| 73 | ||