GroupSetting.php 2.4 KB

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