Log in
Interface

ProductLinkAttributeInterface

Magento\Catalog\Api\Data\ProductLinkAttributeInterface

What it does

This interface defines the structure for product link attributes in Magento 2, which represent custom attributes that can be attached to product relationships (like related products, upsells, or cross-sells).

Developers use this when working with product associations to define additional data beyond the basic link, such as position or quantity.

It provides methods to get and set the attribute code, type, and extension attributes for flexible customization of product relationships.

Public Methods

  • getCode()
  • setCode()
  • getType()
  • setType()
  • getExtensionAttributes()
  • setExtensionAttributes()