AttributeInterface
Magento\Eav\Api\Data\AttributeInterface
What it does
This interface defines the contract for EAV (Entity-Attribute-Value) attributes in Magento 2.
Developers use this when working with custom attributes for entities like products, customers, or categories, providing methods to get/set attribute properties such as code, type, validation rules, labels, options, and backend/frontend configurations.
It's essential for creating, modifying, or retrieving attribute metadata through repositories and services.
Public Methods
- getAttributeId()
- setAttributeId()
- getAttributeCode()
- setAttributeCode()
- getFrontendInput()
- setFrontendInput()
- getEntityTypeId()
- setEntityTypeId()
- getIsRequired()
- setIsRequired()
- getOptions()
- setOptions()
- getIsUserDefined()
- setIsUserDefined()
- getDefaultFrontendLabel()
- setDefaultFrontendLabel()
- getFrontendLabels()
- setFrontendLabels()
- getNote()
- setNote()
- getBackendType()
- setBackendType()
- getBackendModel()
- setBackendModel()
- getSourceModel()
- setSourceModel()
- getDefaultValue()
- setDefaultValue()
- getIsUnique()
- setIsUnique()
- getFrontendClass()
- setFrontendClass()
- getValidationRules()
- setValidationRules()
- getExtensionAttributes()
- setExtensionAttributes()