AbstractModel
Magento\Catalog\Model\AbstractModel
What it does
This abstract base class provides common functionality for Magento 2 catalog entities like products and categories.
Developers extend this class when creating catalog-related models that need attribute locking, store-specific values, multi-store support, and read-only or deletable state management.
It handles core operations like loading entities by attributes, managing store scope, and controlling which attributes can be modified.
Public Methods
- lockAttribute()
- unlockAttribute()
- unlockAttributes()
- getLockedAttributes()
- hasLockedAttributes()
- isLockedAttribute()
- setData()
- unsetData()
- getResourceCollection()
- loadByAttribute()
- getStore()
- getWebsiteStoreIds()
- setAttributeDefaultValue()
- getAttributeDefaultValue()
- setExistsStoreValueFlag()
- getExistsStoreValueFlag()
- beforeSave()
- isDeleteable()
- setIsDeleteable()
- isReadonly()
- setIsReadonly()