1
0

Section.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
  4. *
  5. * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
  6. * @author Jan-Christoph Borchardt <hey@jancborchardt.net>
  7. * @author Joas Schilling <coding@schilljs.com>
  8. * @author Julius Härtl <jus@bitgrid.net>
  9. *
  10. * @license GNU AGPL version 3 or any later version
  11. *
  12. * This program is free software: you can redistribute it and/or modify
  13. * it under the terms of the GNU Affero General Public License as
  14. * published by the Free Software Foundation, either version 3 of the
  15. * License, or (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU Affero General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Affero General Public License
  23. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  24. *
  25. */
  26. namespace OCA\WorkflowEngine\Settings;
  27. use OCA\WorkflowEngine\AppInfo\Application;
  28. use OCP\IL10N;
  29. use OCP\IURLGenerator;
  30. use OCP\Settings\IIconSection;
  31. class Section implements IIconSection {
  32. /** @var IL10N */
  33. private $l;
  34. /** @var IURLGenerator */
  35. private $url;
  36. /**
  37. * @param IURLGenerator $url
  38. * @param IL10N $l
  39. */
  40. public function __construct(IURLGenerator $url, IL10N $l) {
  41. $this->url = $url;
  42. $this->l = $l;
  43. }
  44. /**
  45. * {@inheritdoc}
  46. */
  47. public function getID() {
  48. return 'workflow';
  49. }
  50. /**
  51. * {@inheritdoc}
  52. */
  53. public function getName() {
  54. return $this->l->t('Flow');
  55. }
  56. /**
  57. * {@inheritdoc}
  58. */
  59. public function getPriority() {
  60. return 55;
  61. }
  62. /**
  63. * {@inheritdoc}
  64. */
  65. public function getIcon() {
  66. return $this->url->imagePath(Application::APP_ID, 'app-dark.svg');
  67. }
  68. }