Model
StoreRepository
Magento\Store\Model\StoreRepository
What it does
StoreRepository is the main class for retrieving store information in Magento 2.
Developers use it to fetch store data by ID or code, get lists of all stores, or verify if a store is active.
It acts as a cache-aware data access layer that retrieves store configuration from the application config and provides a consistent interface for store-related operations throughout the application.
Public Methods
- get()
- getActiveStoreByCode()
- getById()
- getActiveStoreById()
- getList()
- clean()