Log in
Model

Group

Magento\Store\Model\Group

What it does

The Group class represents a Store Group (formerly called Store View Group) in Magento 2's multi-store hierarchy.

Developers use this model to manage collections of stores that share the same root category and website, retrieve store information within a group, and handle operations like getting the default store or stores filtered by locale.

It's commonly used when working with multi-store setups to organize stores logically under websites.

Public Methods

  • setStores()
  • getStoreCollection()
  • getStores()
  • getStoreIds()
  • getStoreCodes()
  • getStoresCount()
  • getDefaultStore()
  • getDefaultStoreByLocale()
  • getStoresByLocale()
  • setWebsite()
  • getWebsite()
  • isCanDelete()
  • getDefaultStoreId()
  • setDefaultStoreId()
  • getRootCategoryId()
  • setRootCategoryId()
  • getWebsiteId()
  • setWebsiteId()
  • beforeDelete()
  • afterDelete()
  • afterSave()
  • isReadOnly()
  • getIdentities()
  • getCacheTags()
  • getName()
  • setName()
  • getCode()
  • setCode()
  • getExtensionAttributes()
  • setExtensionAttributes()
  • getScopeType()
  • getScopeTypeName()