Log in
Collection

Swatch\Collection

Magento\Swatches\Model\ResourceModel\Swatch\Collection

What it does

This collection class retrieves and manages swatch attribute data from the database.

Developers use it to load swatch records with filtering capabilities by store ID or specific attribute option IDs, commonly when displaying product color/texture swatches on catalog pages or managing swatch configurations in the admin panel.

Public Methods

  • addStoreFilter()
  • addFilterByOptionsIds()