Section.php 946 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCA\WorkflowEngine\Settings;
  7. use OCA\WorkflowEngine\AppInfo\Application;
  8. use OCP\IL10N;
  9. use OCP\IURLGenerator;
  10. use OCP\Settings\IIconSection;
  11. class Section implements IIconSection {
  12. /** @var IL10N */
  13. private $l;
  14. /** @var IURLGenerator */
  15. private $url;
  16. /**
  17. * @param IURLGenerator $url
  18. * @param IL10N $l
  19. */
  20. public function __construct(IURLGenerator $url, IL10N $l) {
  21. $this->url = $url;
  22. $this->l = $l;
  23. }
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public function getID() {
  28. return 'workflow';
  29. }
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public function getName() {
  34. return $this->l->t('Flow');
  35. }
  36. /**
  37. * {@inheritdoc}
  38. */
  39. public function getPriority() {
  40. return 55;
  41. }
  42. /**
  43. * {@inheritdoc}
  44. */
  45. public function getIcon() {
  46. return $this->url->imagePath(Application::APP_ID, 'app-dark.svg');
  47. }
  48. }