FavoriteAction.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>
  4. *
  5. * @author Joas Schilling <coding@schilljs.com>
  6. * @author Robin Appelman <robin@icewind.nl>
  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\Activity\Settings;
  25. class FavoriteAction extends FileActivitySettings {
  26. /**
  27. * @return string Lowercase a-z and underscore only identifier
  28. * @since 11.0.0
  29. */
  30. public function getIdentifier() {
  31. return 'favorite';
  32. }
  33. /**
  34. * @return string A translated string
  35. * @since 11.0.0
  36. */
  37. public function getName() {
  38. return $this->l->t('A file has been added to or removed from your <strong>favorites</strong>');
  39. }
  40. /**
  41. * @return int whether the filter should be rather on the top or bottom of
  42. * the admin section. The filters are arranged in ascending order of the
  43. * priority values. It is required to return a value between 0 and 100.
  44. * @since 11.0.0
  45. */
  46. public function getPriority() {
  47. return 5;
  48. }
  49. /**
  50. * @return bool True when the option can be changed for the stream
  51. * @since 11.0.0
  52. */
  53. public function canChangeStream() {
  54. return false;
  55. }
  56. /**
  57. * @return bool True when the option can be changed for the stream
  58. * @since 11.0.0
  59. */
  60. public function isDefaultEnabledStream() {
  61. return true;
  62. }
  63. /**
  64. * @return bool True when the option can be changed for the mail
  65. * @since 11.0.0
  66. */
  67. public function canChangeMail() {
  68. return false;
  69. }
  70. /**
  71. * @return bool True when the option can be changed for the stream
  72. * @since 11.0.0
  73. */
  74. public function isDefaultEnabledMail() {
  75. return false;
  76. }
  77. /**
  78. * @return bool True when the option can be changed for the notification
  79. * @since 20.0.0
  80. */
  81. public function canChangeNotification() {
  82. return false;
  83. }
  84. }