ProductLinkManagementInterface.php 845 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Catalog\Api;
  7. /**
  8. * @api
  9. * @since 100.0.2
  10. */
  11. interface ProductLinkManagementInterface
  12. {
  13. /**
  14. * Provide the list of links for a specific product
  15. *
  16. * @param string $sku
  17. * @param string $type
  18. * @return \Magento\Catalog\Api\Data\ProductLinkInterface[]
  19. */
  20. public function getLinkedItemsByType($sku, $type);
  21. /**
  22. * Assign a product link to another product
  23. *
  24. * @param string $sku
  25. * @param \Magento\Catalog\Api\Data\ProductLinkInterface[] $items
  26. * @throws \Magento\Framework\Exception\NoSuchEntityException
  27. * @throws \Magento\Framework\Exception\CouldNotSaveException
  28. * @return bool
  29. */
  30. public function setProductLinks($sku, array $items);
  31. }