Log in
Model

Attribute

Magento\Eav\Model\Entity\Attribute

What it does

This class represents an EAV (Entity-Attribute-Value) attribute in Magento 2, managing the configuration and behavior of custom attributes for entities like products, customers, and categories.

Developers use this class to create, save, and retrieve attribute definitions, including their types, labels, default values, and validation rules.

It handles attribute code validation, store-specific labels, and ensures proper data type conversions before saving.

Public Methods

  • deleteEntity()
  • loadEntityAttributeIdBySet()
  • beforeSave()
  • afterSave()
  • getBackendTypeByInput()
  • getDefaultValueByInput()
  • getAttributeCodesByFrontendType()
  • getStoreLabels()
  • getStoreLabel()
  • getSortWeight()
  • getIdentities()