GroupSetting.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 GroupSetting 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(): string {
  23. return 'group_settings';
  24. }
  25. /**
  26. * @return string A translated string
  27. * @since 11.0.0
  28. */
  29. public function getName(): string {
  30. return $this->l->t('Your <strong>group memberships</strong> were 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(): int {
  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(): bool {
  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(): bool {
  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(): bool {
  60. return true;
  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(): bool {
  67. return true;
  68. }
  69. }