Model
Emulation
Magento\Store\Model\App\Emulation
What it does
This class allows developers to temporarily change the store environment context (store view, locale, design theme, translations) for operations like sending emails or generating content in a different store scope.
It's commonly used when background processes need to execute in a specific store's context and then restore the original environment afterward.
Public Methods
- startEnvironmentEmulation()
- stopEnvironmentEmulation()
- storeCurrentEnvironmentInfo()
- _resetState()