You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Setting.php 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
  4. *
  5. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  6. * @author Joas Schilling <coding@schilljs.com>
  7. *
  8. * @license GNU AGPL version 3 or any later version
  9. *
  10. * This program is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU Affero General Public License as
  12. * published by the Free Software Foundation, either version 3 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. *
  23. */
  24. namespace OCA\Settings\Activity;
  25. use OCP\Activity\ISetting;
  26. use OCP\IL10N;
  27. class Setting implements ISetting {
  28. /** @var IL10N */
  29. protected $l;
  30. /**
  31. * @param IL10N $l10n
  32. */
  33. public function __construct(IL10N $l10n) {
  34. $this->l = $l10n;
  35. }
  36. /**
  37. * @return string Lowercase a-z and underscore only identifier
  38. * @since 11.0.0
  39. */
  40. public function getIdentifier() {
  41. return 'personal_settings';
  42. }
  43. /**
  44. * @return string A translated string
  45. * @since 11.0.0
  46. */
  47. public function getName() {
  48. return $this->l->t('Your <strong>password</strong> or <strong>email</strong> was modified');
  49. }
  50. /**
  51. * @return int whether the filter should be rather on the top or bottom of
  52. * the admin section. The filters are arranged in ascending order of the
  53. * priority values. It is required to return a value between 0 and 100.
  54. * @since 11.0.0
  55. */
  56. public function getPriority() {
  57. return 0;
  58. }
  59. /**
  60. * @return bool True when the option can be changed for the stream
  61. * @since 11.0.0
  62. */
  63. public function canChangeStream() {
  64. return false;
  65. }
  66. /**
  67. * @return bool True when the option can be changed for the stream
  68. * @since 11.0.0
  69. */
  70. public function isDefaultEnabledStream() {
  71. return true;
  72. }
  73. /**
  74. * @return bool True when the option can be changed for the mail
  75. * @since 11.0.0
  76. */
  77. public function canChangeMail() {
  78. return false;
  79. }
  80. /**
  81. * @return bool True when the option can be changed for the stream
  82. * @since 11.0.0
  83. */
  84. public function isDefaultEnabledMail() {
  85. return false;
  86. }
  87. }