1
0

Setting.php 2.3 KB

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