Delegation.php 1004 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCA\Settings\Sections\Admin;
  7. use OCP\IL10N;
  8. use OCP\IURLGenerator;
  9. use OCP\Settings\IIconSection;
  10. class Delegation implements IIconSection {
  11. /** @var IL10N */
  12. private $l;
  13. /** @var IURLGenerator */
  14. private $url;
  15. /**
  16. * @param IURLGenerator $url
  17. * @param IL10N $l
  18. */
  19. public function __construct(IURLGenerator $url, IL10N $l) {
  20. $this->url = $url;
  21. $this->l = $l;
  22. }
  23. /**
  24. * {@inheritdoc}
  25. * @return string
  26. */
  27. public function getID() {
  28. return 'admindelegation';
  29. }
  30. /**
  31. * {@inheritdoc}
  32. * @return string
  33. */
  34. public function getName() {
  35. return $this->l->t('Administration privileges');
  36. }
  37. /**
  38. * {@inheritdoc}
  39. * @return int
  40. */
  41. public function getPriority() {
  42. return 54;
  43. }
  44. /**
  45. * {@inheritdoc}
  46. * @return string
  47. */
  48. public function getIcon() {
  49. return $this->url->imagePath('core', 'actions/user-admin.svg');
  50. }
  51. }