Calendar.php 801 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\Settings\Sections\Personal;
  8. use OCP\IL10N;
  9. use OCP\IURLGenerator;
  10. use OCP\Settings\IIconSection;
  11. class Calendar implements IIconSection {
  12. private IL10N $l;
  13. private IURLGenerator $urlGenerator;
  14. public function __construct(IL10N $l, IURLGenerator $urlGenerator) {
  15. $this->l = $l;
  16. $this->urlGenerator = $urlGenerator;
  17. }
  18. public function getIcon(): string {
  19. return $this->urlGenerator->imagePath('dav', 'calendar.svg');
  20. }
  21. public function getID(): string {
  22. return 'calendar';
  23. }
  24. public function getName(): string {
  25. return $this->l->t('Calendar');
  26. }
  27. public function getPriority(): int {
  28. return 50;
  29. }
  30. }