IAction.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCP\Contacts\ContactsMenu;
  7. use JsonSerializable;
  8. /**
  9. * Apps should use the IActionFactory to create new action objects
  10. *
  11. * @since 12.0
  12. */
  13. interface IAction extends JsonSerializable {
  14. /**
  15. * @param string $icon absolute URI to an icon
  16. * @since 12.0
  17. */
  18. public function setIcon(string $icon);
  19. /**
  20. * @return string localized action name, e.g. 'Call'
  21. * @since 12.0
  22. */
  23. public function getName(): string;
  24. /**
  25. * @param string $name localized action name, e.g. 'Call'
  26. * @since 12.0
  27. */
  28. public function setName(string $name);
  29. /**
  30. * @param int $priority priorize actions, high order ones are shown on top
  31. * @since 12.0
  32. */
  33. public function setPriority(int $priority);
  34. /**
  35. * @return int priority to priorize actions, high order ones are shown on top
  36. * @since 12.0
  37. */
  38. public function getPriority(): int;
  39. /**
  40. * @param string $appId
  41. * @since 23.0.0
  42. */
  43. public function setAppId(string $appId);
  44. /**
  45. * @return string
  46. * @since 23.0.0
  47. */
  48. public function getAppId(): string;
  49. }