FileCreated.php 2.3 KB

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