Log in
Model

Attribute

Magento\Catalog\Model\ProductLink\Attribute

What it does

This class represents an attribute of a product link relationship in Magento 2, such as attributes for related products, upsells, or cross-sells.

Developers use this to define and retrieve metadata about product link attributes, including their code (identifier) and type (data type like string, int, etc.).

It's typically used when working with product associations through the API or when customizing product link behavior.

Public Methods

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