Interface
ProductLinkInterface
Magento\Catalog\Api\Data\ProductLinkInterface
What it does
This interface defines the contract for product link data objects in Magento 2, which represent relationships between products such as related products, upsells, and cross-sells.
Developers use this interface when programmatically creating, retrieving, or modifying product associations through the API layer, specifying the source product SKU, linked product SKU, link type, and display position.
Public Methods
- getSku()
- setSku()
- getLinkType()
- setLinkType()
- getLinkedProductSku()
- setLinkedProductSku()
- getLinkedProductType()
- setLinkedProductType()
- getPosition()
- setPosition()
- getExtensionAttributes()
- setExtensionAttributes()