Log in
Model

Attribute

Magento\Catalog\Model\Layer\Filter\Attribute

What it does

This class handles layered navigation filtering for product attributes in Magento 2 catalog pages.

Developers use it when implementing custom attribute filters or modifying how products are filtered based on attribute values like color, size, or custom attributes.

It applies selected attribute options to product collections and builds filter items with counts for display in the navigation.

Public Methods

  • apply()