Availability.php 840 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 Availability implements IIconSection {
  12. /** @var IL10N */
  13. private $l;
  14. /** @var IURLGenerator */
  15. private $urlGenerator;
  16. public function __construct(IL10N $l, IURLGenerator $urlGenerator) {
  17. $this->l = $l;
  18. $this->urlGenerator = $urlGenerator;
  19. }
  20. public function getIcon(): string {
  21. return $this->urlGenerator->imagePath('dav', 'schedule.svg');
  22. }
  23. public function getID(): string {
  24. return 'availability';
  25. }
  26. public function getName(): string {
  27. return $this->l->t('Availability');
  28. }
  29. public function getPriority(): int {
  30. return 50;
  31. }
  32. }