IMenuAction.php 873 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCP\AppFramework\Http\Template;
  7. /**
  8. * Interface IMenuAction
  9. *
  10. * @since 14.0
  11. */
  12. interface IMenuAction {
  13. /**
  14. * @since 14.0.0
  15. * @return string
  16. */
  17. public function getId(): string;
  18. /**
  19. * The translated label of the menu item.
  20. *
  21. * @since 14.0.0
  22. * @return string
  23. */
  24. public function getLabel(): string;
  25. /**
  26. * The link this menu item points to.
  27. *
  28. * @since 14.0.0
  29. * @return string
  30. */
  31. public function getLink(): string;
  32. /**
  33. * @since 14.0.0
  34. * @return int
  35. */
  36. public function getPriority(): int;
  37. /**
  38. * Custom render function.
  39. * The returned HTML will be wrapped within a listitem element (`<li>...</li>`).
  40. *
  41. * @since 14.0.0
  42. * @return string
  43. */
  44. public function render(): string;
  45. }