Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
CurrencyConfig Class Reference

Public Member Functions

 __construct (State $appState, ScopeConfigInterface $config, StoreManagerInterface $storeManager)
 
 getConfigCurrencies (string $path)
 

Detailed Description

Provide config values for allowed, base and default currencies.

Definition at line 18 of file CurrencyConfig.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( State  $appState,
ScopeConfigInterface  $config,
StoreManagerInterface  $storeManager 
)

CurrencyConfig constructor.

Parameters
State$appState
ScopeConfigInterface$config
StoreManagerInterface$storeManager

Definition at line 42 of file CurrencyConfig.php.

46  {
47  $this->appState = $appState;
48  $this->config = $config;
49  $this->storeManager = $storeManager;
50  }

Member Function Documentation

◆ getConfigCurrencies()

getConfigCurrencies ( string  $path)

Retrieve config currency data by config path.

Parameters
string$path
Returns
array

Definition at line 58 of file CurrencyConfig.php.

59  {
60  $result = $this->appState->getAreaCode() === Area::AREA_ADMINHTML
61  ? $this->getConfigForAllStores($path)
62  : $this->getConfigForCurrentStore($path);
63  sort($result);
64 
65  return array_unique($result);
66  }

The documentation for this class was generated from the following file: