Setting.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCA\Settings\Activity;
  7. use OCP\Activity\ISetting;
  8. use OCP\IL10N;
  9. class Setting implements ISetting {
  10. /** @var IL10N */
  11. protected $l;
  12. /**
  13. * @param IL10N $l10n
  14. */
  15. public function __construct(IL10N $l10n) {
  16. $this->l = $l10n;
  17. }
  18. /**
  19. * @return string Lowercase a-z and underscore only identifier
  20. * @since 11.0.0
  21. */
  22. public function getIdentifier() {
  23. return 'personal_settings';
  24. }
  25. /**
  26. * @return string A translated string
  27. * @since 11.0.0
  28. */
  29. public function getName() {
  30. return $this->l->t('Your <strong>password</strong> or <strong>email</strong> was modified');
  31. }
  32. /**
  33. * @return int whether the filter should be rather on the top or bottom of
  34. * the admin section. The filters are arranged in ascending order of the
  35. * priority values. It is required to return a value between 0 and 100.
  36. * @since 11.0.0
  37. */
  38. public function getPriority() {
  39. return 0;
  40. }
  41. /**
  42. * @return bool True when the option can be changed for the stream
  43. * @since 11.0.0
  44. */
  45. public function canChangeStream() {
  46. return false;
  47. }
  48. /**
  49. * @return bool True when the option can be changed for the stream
  50. * @since 11.0.0
  51. */
  52. public function isDefaultEnabledStream() {
  53. return true;
  54. }
  55. /**
  56. * @return bool True when the option can be changed for the mail
  57. * @since 11.0.0
  58. */
  59. public function canChangeMail() {
  60. return false;
  61. }
  62. /**
  63. * @return bool True when the option can be changed for the stream
  64. * @since 11.0.0
  65. */
  66. public function isDefaultEnabledMail() {
  67. return false;
  68. }
  69. }