Log in
Interface

CategoryProductLinkInterface

Magento\Catalog\Api\Data\CategoryProductLinkInterface

What it does

This interface defines the contract for representing the relationship between a category and a product in Magento 2's catalog.

Developers use this when managing product assignments to categories, including the product's position within the category and retrieving product details via SKU.

It's commonly used in category management operations, product imports, and when programmatically assigning or retrieving products within specific categories.

Public Methods

  • getSku()
  • setSku()
  • getPosition()
  • setPosition()
  • getCategoryId()
  • setCategoryId()
  • getExtensionAttributes()
  • setExtensionAttributes()