Log in
Model

AbstractModel

Magento\Catalog\Model\AbstractModel

What it does

This abstract model serves as a base class for Magento 2 catalog entities like products and categories.

Developers extend this class when creating custom catalog entities or modifying existing ones, gaining built-in functionality for attribute locking, store-specific values, and read-only/deleteable states.

It provides essential methods for managing entity data across different store scopes and handling attribute-level permissions.

Public Methods

  • lockAttribute()
  • unlockAttribute()
  • unlockAttributes()
  • getLockedAttributes()
  • hasLockedAttributes()
  • isLockedAttribute()
  • setData()
  • unsetData()
  • getResourceCollection()
  • loadByAttribute()
  • getStore()
  • getWebsiteStoreIds()
  • setAttributeDefaultValue()
  • getAttributeDefaultValue()
  • setExistsStoreValueFlag()
  • getExistsStoreValueFlag()
  • beforeSave()
  • isDeleteable()
  • setIsDeleteable()
  • isReadonly()
  • setIsReadonly()