Log in
Collection

Customer\Collection

Magento\Customer\Model\ResourceModel\Customer\Collection

What it does

This collection class is used to retrieve and manipulate groups of customer records from the database in Magento 2.

Developers use it to load multiple customers with filtering, sorting, and specialized operations like grouping by email or adding customer names to the result set.

It extends the EAV collection to handle customer entity attributes and provides optimized methods for common customer data retrieval scenarios.

Public Methods

  • groupByEmail()
  • addNameToSelect()
  • getSelectCountSql()