Log in
Model

AbstractFilter

Magento\Catalog\Model\Layer\Filter\AbstractFilter

What it does

This abstract class provides the foundation for all layered navigation filters in Magento 2 catalog (like price, category, or attribute filters).

Developers extend this class when creating custom product filters for the catalog's layered navigation sidebar, implementing the filter logic and how filter items are displayed to customers.

It handles common filter operations like applying filters to product collections, managing filter items, and retrieving filter-related data.

Public Methods

  • setRequestVar()
  • getRequestVar()
  • getResetValue()
  • getCleanValue()
  • apply()
  • getItemsCount()
  • getItems()
  • setItems()
  • getLayer()
  • setAttributeModel()
  • getAttributeModel()
  • getName()
  • getStoreId()
  • setStoreId()
  • getWebsiteId()
  • setWebsiteId()
  • getClearLinkText()