Log in
Model

Context

Magento\Store\Model\StoreSwitcher\Context

What it does

This class serves as a data transfer object (DTO) that encapsulates context information during store view switching operations in Magento 2.

Developers use this class to pass store switching details—including the original store, target store, and redirect URL—between different components handling the store switch process, ensuring consistent data access throughout the operation.

Public Methods

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