CategoryLink
Magento\Catalog\Model\ResourceModel\Product\CategoryLink
What it does
This resource model manages the relationships between products and categories in Magento 2.
Developers use this class to retrieve, save, update, or delete product-category associations, including managing the position/sort order of products within categories.
It's particularly useful when programmatically assigning products to categories or reordering products within category listings.
Public Methods
- getCategoryLinks()
- saveCategoryLinks()
- updateCategoryLinks()