1
0

Overview.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
  4. *
  5. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  6. * @author Julius Härtl <jus@bitgrid.net>
  7. * @author Morris Jobke <hey@morrisjobke.de>
  8. * @author Roeland Jago Douma <roeland@famdouma.nl>
  9. *
  10. * @license GNU AGPL version 3 or any later version
  11. *
  12. * This program is free software: you can redistribute it and/or modify
  13. * it under the terms of the GNU Affero General Public License as
  14. * published by the Free Software Foundation, either version 3 of the
  15. * License, or (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU Affero General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Affero General Public License
  23. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  24. *
  25. */
  26. namespace OCA\Settings\Settings\Admin;
  27. use OCP\AppFramework\Http\TemplateResponse;
  28. use OCP\IConfig;
  29. use OCP\IL10N;
  30. use OCP\Settings\IDelegatedSettings;
  31. class Overview implements IDelegatedSettings {
  32. /** @var IConfig */
  33. private $config;
  34. /** @var IL10N $l*/
  35. private $l;
  36. public function __construct(IConfig $config, IL10N $l) {
  37. $this->config = $config;
  38. $this->l = $l;
  39. }
  40. /**
  41. * @return TemplateResponse
  42. */
  43. public function getForm() {
  44. $parameters = [
  45. 'checkForWorkingWellKnownSetup' => $this->config->getSystemValue('check_for_working_wellknown_setup', true),
  46. ];
  47. return new TemplateResponse('settings', 'settings/admin/overview', $parameters, '');
  48. }
  49. /**
  50. * @return string the section ID, e.g. 'sharing'
  51. */
  52. public function getSection() {
  53. return 'overview';
  54. }
  55. /**
  56. * @return int whether the form should be rather on the top or bottom of
  57. * the admin section. The forms are arranged in ascending order of the
  58. * priority values. It is required to return a value between 0 and 100.
  59. *
  60. * E.g.: 70
  61. */
  62. public function getPriority() {
  63. return 10;
  64. }
  65. public function getName(): ?string {
  66. return $this->l->t('Security & setup warnings');
  67. }
  68. public function getAuthorizedAppConfig(): array {
  69. return [];
  70. }
  71. }