Log in
Collection

AbstractCollection

Magento\Catalog\Model\ResourceModel\Collection\AbstractCollection

What it does

This abstract collection class serves as the base for all Magento 2 catalog entity collections (products, categories, etc.) that use EAV attributes.

It handles store scope management, ensuring that attribute values are loaded correctly for multi-store environments by joining default and store-specific attribute values.

Developers extend this class when creating custom catalog collections that need to respect store views and scoped attributes.

Public Methods

  • _resetState()
  • setStore()
  • setStoreId()
  • getStoreId()
  • getDefaultStoreId()