1
0

Setting.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2021 Joas Schilling <coding@schilljs.com>
  5. *
  6. * @author Joas Schilling <coding@schilljs.com>
  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\DAV\CardDAV\Activity;
  25. use OCA\DAV\CalDAV\Activity\Setting\CalDAVSetting;
  26. class Setting extends CalDAVSetting {
  27. /**
  28. * @return string Lowercase a-z and underscore only identifier
  29. */
  30. public function getIdentifier(): string {
  31. return 'contacts';
  32. }
  33. /**
  34. * @return string A translated string
  35. */
  36. public function getName(): string {
  37. return $this->l->t('A <strong>contact</strong> or <strong>address book</strong> was modified');
  38. }
  39. /**
  40. * @return int whether the filter should be rather on the top or bottom of
  41. * the admin section. The filters are arranged in ascending order of the
  42. * priority values. It is required to return a value between 0 and 100.
  43. */
  44. public function getPriority(): int {
  45. return 50;
  46. }
  47. /**
  48. * @return bool True when the option can be changed for the stream
  49. */
  50. public function canChangeStream(): bool {
  51. return true;
  52. }
  53. /**
  54. * @return bool True when the option can be changed for the stream
  55. */
  56. public function isDefaultEnabledStream(): bool {
  57. return true;
  58. }
  59. /**
  60. * @return bool True when the option can be changed for the mail
  61. */
  62. public function canChangeMail(): bool {
  63. return true;
  64. }
  65. /**
  66. * @return bool True when the option can be changed for the stream
  67. */
  68. public function isDefaultEnabledMail(): bool {
  69. return false;
  70. }
  71. }