public function PluginBasedExchangeRateProvider::loadConfiguration in Currency 8.3
Loads the plugin configuration.
Return value
bool[] Keys are currency_exchanger plugin names. Values are booleans that describe whether the plugins are enabled. Items are ordered by weight.
1 call to PluginBasedExchangeRateProvider::loadConfiguration()
File
- src/
PluginBasedExchangeRateProvider.php, line 46
Class
- PluginBasedExchangeRateProvider
- Provides currency exchange rates through plugins.
Namespace
Drupal\currencyCode
public function loadConfiguration() {
$definitions = $this->currencyExchangeRateProviderManager
->getDefinitions();
$configuration_data = $this->configFactory
->get('currency.exchange_rate_provider')
->get('plugins');
$configuration = array();
foreach ($configuration_data as $data) {
$configuration[$data['plugin_id']] = $data['status'];
}
return $configuration + array_fill_keys(array_keys($definitions), FALSE);
}