FileDeleted.php 2.3 KB

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