Model
Attribute
Magento\Customer\Model\Attribute
What it does
This class manages customer attributes in Magento 2, handling their lifecycle operations like saving, deleting, and indexing.
Developers use this class when creating or modifying customer attributes programmatically, as it ensures the customer grid indexer is invalidated when attributes used in the admin grid change, and maintains the attribute metadata cache for optimal performance.
Public Methods
- afterSave()
- afterDelete()
- afterDeleteCommit()
- invalidate()
- canBeSearchableInGrid()
- canBeFilterableInGrid()