1
0

Setting.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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\Comments\Activity;
  24. use OCP\Activity\ISetting;
  25. use OCP\IL10N;
  26. class Setting 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 'comments';
  41. }
  42. /**
  43. * @return string A translated string
  44. * @since 11.0.0
  45. */
  46. public function getName() {
  47. return $this->l->t('<strong>Comments</strong> for files');
  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 50;
  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. }