Overview.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCA\Settings\Settings\Admin;
  7. use OCP\AppFramework\Http\TemplateResponse;
  8. use OCP\IConfig;
  9. use OCP\IL10N;
  10. use OCP\Settings\IDelegatedSettings;
  11. class Overview implements IDelegatedSettings {
  12. /** @var IConfig */
  13. private $config;
  14. /** @var IL10N $l*/
  15. private $l;
  16. public function __construct(IConfig $config, IL10N $l) {
  17. $this->config = $config;
  18. $this->l = $l;
  19. }
  20. /**
  21. * @return TemplateResponse
  22. */
  23. public function getForm() {
  24. $parameters = [
  25. 'checkForWorkingWellKnownSetup' => $this->config->getSystemValue('check_for_working_wellknown_setup', true),
  26. ];
  27. return new TemplateResponse('settings', 'settings/admin/overview', $parameters, '');
  28. }
  29. /**
  30. * @return string the section ID, e.g. 'sharing'
  31. */
  32. public function getSection() {
  33. return 'overview';
  34. }
  35. /**
  36. * @return int whether the form should be rather on the top or bottom of
  37. * the admin section. The forms are arranged in ascending order of the
  38. * priority values. It is required to return a value between 0 and 100.
  39. *
  40. * E.g.: 70
  41. */
  42. public function getPriority() {
  43. return 10;
  44. }
  45. public function getName(): ?string {
  46. return $this->l->t('Security & setup warnings');
  47. }
  48. public function getAuthorizedAppConfig(): array {
  49. return [];
  50. }
  51. }