1
0

Availability.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 Availability implements IIconSection {
  26. /** @var IL10N */
  27. private $l;
  28. /** @var IURLGenerator */
  29. private $urlGenerator;
  30. public function __construct(IL10N $l, IURLGenerator $urlGenerator) {
  31. $this->l = $l;
  32. $this->urlGenerator = $urlGenerator;
  33. }
  34. public function getIcon(): string {
  35. return $this->urlGenerator->imagePath('dav', 'schedule.svg');
  36. }
  37. public function getID(): string {
  38. return 'availability';
  39. }
  40. public function getName(): string {
  41. return $this->l->t('Availability');
  42. }
  43. public function getPriority(): int {
  44. return 50;
  45. }
  46. }