Model
Attribute
Magento\Catalog\Model\Category\Attribute
What it does
This class manages category-specific attributes in Magento 2's catalog system.
Developers use it to define and configure custom attributes for category entities, controlling their behavior in search, filtering, sorting, admin grids, and frontend display.
It provides methods to set attribute properties like visibility, searchability, filterability, and scope (store/website/global).
Public Methods
- getApplyTo()
- setApplyTo()
- getIsWysiwygEnabled()
- setIsWysiwygEnabled()
- getIsHtmlAllowedOnFront()
- setIsHtmlAllowedOnFront()
- getUsedForSortBy()
- setUsedForSortBy()
- getIsFilterable()
- setIsFilterable()
- getIsFilterableInSearch()
- getIsUsedInGrid()
- getIsVisibleInGrid()
- getIsFilterableInGrid()
- setIsFilterableInSearch()
- getPosition()
- setPosition()
- getIsSearchable()
- setIsSearchable()
- getIsVisibleInAdvancedSearch()
- setIsVisibleInAdvancedSearch()
- getIsComparable()
- setIsComparable()
- getIsUsedForPromoRules()
- setIsUsedForPromoRules()
- getIsVisibleOnFront()
- setIsVisibleOnFront()
- getUsedInProductListing()
- setUsedInProductListing()
- getIsVisible()
- setIsVisible()
- getScope()
- setScope()
- setIsUsedInGrid()
- setIsVisibleInGrid()
- setIsFilterableInGrid()