Shared.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>
  4. *
  5. * @author Joas Schilling <coding@schilljs.com>
  6. * @author Morris Jobke <hey@morrisjobke.de>
  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\Files_Sharing\Activity\Settings;
  25. use OCP\Activity\ISetting;
  26. use OCP\IL10N;
  27. class Shared implements ISetting {
  28. /** @var IL10N */
  29. protected $l;
  30. /**
  31. * @param IL10N $l
  32. */
  33. public function __construct(IL10N $l) {
  34. $this->l = $l;
  35. }
  36. /**
  37. * @return string Lowercase a-z and underscore only identifier
  38. * @since 11.0.0
  39. */
  40. public function getIdentifier() {
  41. return 'shared';
  42. }
  43. /**
  44. * @return string A translated string
  45. * @since 11.0.0
  46. */
  47. public function getName() {
  48. return $this->l->t('A file or folder has been <strong>shared</strong>');
  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() {
  57. return 10;
  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() {
  64. return true;
  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() {
  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() {
  78. return true;
  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() {
  85. return false;
  86. }
  87. }