Model
CollectionProvider
Magento\Catalog\Model\ProductLink\CollectionProvider
What it does
This class retrieves and organizes linked products (related, cross-sells, upsells) for one or more products in Magento 2.
Developers use it to get collections of linked products with their metadata like position and type, either for a single product or as a batch map for multiple products, which is useful for product detail pages and recommendation systems.
Public Methods
- getCollection()
- getMap()