Calendar.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  5. *
  6. * Mail
  7. *
  8. * This code is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU Affero General Public License, version 3,
  10. * as published by the Free Software Foundation.
  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, version 3,
  18. * along with this program. If not, see <http://www.gnu.org/licenses/>
  19. *
  20. */
  21. namespace OCA\Settings\Sections\Personal;
  22. use OCP\IL10N;
  23. use OCP\IURLGenerator;
  24. use OCP\Settings\IIconSection;
  25. class Calendar implements IIconSection {
  26. private IL10N $l;
  27. private IURLGenerator $urlGenerator;
  28. public function __construct(IL10N $l, IURLGenerator $urlGenerator) {
  29. $this->l = $l;
  30. $this->urlGenerator = $urlGenerator;
  31. }
  32. public function getIcon(): string {
  33. return $this->urlGenerator->imagePath('dav', 'calendar.svg');
  34. }
  35. public function getID(): string {
  36. return 'calendar';
  37. }
  38. public function getName(): string {
  39. return $this->l->t('Calendar');
  40. }
  41. public function getPriority(): int {
  42. return 50;
  43. }
  44. }