Log in
Model

State

Magento\Catalog\Model\Layer\State

What it does

This class manages the state of layered navigation filters in Magento 2 catalog pages.

Developers use it to track which filters (like category, price, color) are currently applied by customers when browsing products.

It provides methods to add, set, and retrieve the collection of active filter items during a shopping session.

Public Methods

  • addFilter()
  • setFilters()
  • getFilters()