IActionFactory.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. /**
  8. * @since 12.0
  9. */
  10. interface IActionFactory {
  11. /**
  12. * Construct and return a new link action for the contacts menu
  13. *
  14. * @since 12.0
  15. *
  16. * @param string $icon full path to the action's icon
  17. * @param string $name localized name of the action
  18. * @param string $href target URL
  19. * @param string $appId the app ID registering the action
  20. * @return ILinkAction
  21. */
  22. public function newLinkAction(string $icon, string $name, string $href, string $appId = ''): ILinkAction;
  23. /**
  24. * Construct and return a new email action for the contacts menu
  25. *
  26. * @since 12.0
  27. *
  28. * @param string $icon full path to the action's icon
  29. * @param string $name localized name of the action
  30. * @param string $email target e-mail address
  31. * @param string $appId the appName registering the action
  32. * @return ILinkAction
  33. */
  34. public function newEMailAction(string $icon, string $name, string $email, string $appId = ''): ILinkAction;
  35. }