GroupSetting.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 GroupSetting implements ISetting {
  10. /**
  11. * @param IL10N $l
  12. */
  13. public function __construct(
  14. protected IL10N $l,
  15. ) {
  16. }
  17. /**
  18. * @return string Lowercase a-z and underscore only identifier
  19. * @since 11.0.0
  20. */
  21. public function getIdentifier(): string {
  22. return 'group_settings';
  23. }
  24. /**
  25. * @return string A translated string
  26. * @since 11.0.0
  27. */
  28. public function getName(): string {
  29. return $this->l->t('Your <strong>group memberships</strong> were modified');
  30. }
  31. /**
  32. * @return int whether the filter should be rather on the top or bottom of
  33. * the admin section. The filters are arranged in ascending order of the
  34. * priority values. It is required to return a value between 0 and 100.
  35. * @since 11.0.0
  36. */
  37. public function getPriority(): int {
  38. return 0;
  39. }
  40. /**
  41. * @return bool True when the option can be changed for the stream
  42. * @since 11.0.0
  43. */
  44. public function canChangeStream(): bool {
  45. return false;
  46. }
  47. /**
  48. * @return bool True when the option can be changed for the stream
  49. * @since 11.0.0
  50. */
  51. public function isDefaultEnabledStream(): bool {
  52. return true;
  53. }
  54. /**
  55. * @return bool True when the option can be changed for the mail
  56. * @since 11.0.0
  57. */
  58. public function canChangeMail(): bool {
  59. return true;
  60. }
  61. /**
  62. * @return bool True when the option can be changed for the stream
  63. * @since 11.0.0
  64. */
  65. public function isDefaultEnabledMail(): bool {
  66. return true;
  67. }
  68. }