Setting.php 2.3 KB

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