Interface
CategoryProductLinkInterface
Magento\Catalog\Api\Data\CategoryProductLinkInterface
What it does
This interface defines the contract for linking products to categories in Magento 2.
Developers use this when they need to assign products to categories programmatically, including setting the product's position within the category and managing the relationship between category IDs and product SKUs through the API.
Public Methods
- getSku()
- setSku()
- getPosition()
- setPosition()
- getCategoryId()
- setCategoryId()
- getExtensionAttributes()
- setExtensionAttributes()