Log in
Model

Attribute

Magento\Catalog\Model\ResourceModel\Eav\Attribute

What it does

This class represents a catalog product attribute in Magento 2's EAV system.

Developers use it to manage product attribute properties like scope (global/website/store), searchability, filterability, and whether attributes appear in product listings or grids.

It handles attribute saving/deletion, triggers product indexer updates when attribute properties change, and validates attribute modifications.

Public Methods

  • beforeSave()
  • afterSave()
  • isEnabledInFlat()
  • beforeDelete()
  • afterDeleteCommit()
  • getIsGlobal()
  • isScopeGlobal()
  • isScopeWebsite()
  • isScopeStore()
  • getStoreId()
  • getApplyTo()
  • getSourceModel()
  • isAllowedForRuleCondition()
  • _getDefaultSourceModel()
  • isIndexable()
  • getIndexType()
  • getIsWysiwygEnabled()
  • getIsHtmlAllowedOnFront()
  • getUsedForSortBy()
  • getIsFilterable()
  • getIsFilterableInSearch()
  • getIsUsedInGrid()
  • getIsVisibleInGrid()
  • getIsFilterableInGrid()
  • getPosition()
  • getIsSearchable()
  • getIsVisibleInAdvancedSearch()
  • getIsComparable()
  • getIsUsedForPromoRules()
  • getIsVisibleOnFront()
  • getUsedInProductListing()
  • getIsVisible()
  • getScope()
  • setIsWysiwygEnabled()
  • setIsHtmlAllowedOnFront()
  • setUsedForSortBy()
  • setIsFilterable()
  • setIsFilterableInSearch()
  • setPosition()
  • setApplyTo()
  • setIsSearchable()
  • setIsVisibleInAdvancedSearch()
  • setIsComparable()
  • setIsUsedForPromoRules()
  • setIsVisibleOnFront()
  • setUsedInProductListing()
  • setIsVisible()
  • setScope()
  • afterDelete()
  • setIsUsedInGrid()
  • setIsVisibleInGrid()
  • setIsFilterableInGrid()
  • deleteEntity()