Log in
Model

Context

Magento\Store\Model\StoreSwitcher\Context

What it does

This class serves as a data container (context object) that holds information needed when switching between different store views in Magento 2.

Developers use this class to pass store switching details - the original store, target store, and redirect URL - between different components during the store switching process.

It's typically injected into classes that need to handle store view switching logic.

Public Methods

  • getFromStore()
  • getTargetStore()
  • getRedirectUrl()