ProductLinkRepositoryInterface
Magento\Catalog\Api\ProductLinkRepositoryInterface
What it does
This interface defines the contract for managing product links in Magento 2, such as related products, up-sells, and cross-sells.
Developers use this repository to retrieve all links for a product, create new product associations, or remove existing ones.
It provides both entity-based and ID-based methods for deleting product links, making it flexible for different implementation scenarios.
Public Methods
- getList()
- save()
- delete()
- deleteById()