CollectionProvider
Magento\Catalog\Model\ProductLink\CollectionProvider
What it does
This class retrieves and manages linked product collections in Magento 2, such as related products, cross-sells, and up-sells.
Developers use it when they need to fetch and organize product links for display on product pages or in custom modules.
It provides two main methods: one for getting a single link type collection and another for efficiently loading multiple link types for multiple products at once.
Public Methods
- getCollection()
- getMap()