Log in
Interface

CategoryLinkInterface

Magento\Catalog\Api\Data\CategoryLinkInterface

What it does

This interface defines the contract for linking products to categories in Magento 2.

Developers use it when working with product-category associations through the API, allowing them to set/get the category ID and position where a product appears within that category.

It's commonly used in catalog management operations when assigning products to categories or retrieving category assignment data.

Public Methods

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