Model
CategoryLinkManagement
Magento\Catalog\Model\CategoryLinkManagement
What it does
This class manages the relationship between products and categories in Magento 2.
Developers use it to retrieve all products assigned to a specific category or to assign/unassign products to multiple categories programmatically.
It handles the linking logic, indexing updates, and ensures data consistency when managing product-category associations through the API.
Public Methods
- getAssignedProducts()
- assignProductToCategories()