public static function CurrencyExchanger::loadConfiguration in Currency 7.2
Loads the configuration.
Return value
array Keys are currency_exchanger plugin names. Values are booleans that describe whether the plugins are enabled. Items are ordered by weight.
3 calls to CurrencyExchanger::loadConfiguration()
- CurrencyExchanger::loadExchangers in currency/
includes/ CurrencyExchanger.inc - Returns the names of enabled currency exchanger classes, sorted by weight.
- CurrencyExchangerUIWebTestCase::testCurrencyExchangerUI in currency/
tests/ CurrencyConverterUIWebTestCase.test - Test CurrencyExchanger's UI.
- currency_form_currency_exchanger in currency/
currency.module - Implements form build callback: the currency exchanger overview form.
File
- currency/
includes/ CurrencyExchanger.inc, line 21 - Contains class CurrencyExchanger.
Class
- CurrencyExchanger
- A currency exchanger that uses other available currency exchangers to load exchange rates.
Code
public static function loadConfiguration() {
ctools_include('plugins');
$plugins = ctools_get_plugins('currency', 'currency_exchanger');
$configuration = variable_get('currency_exchanger', array()) + array_fill_keys(array_keys($plugins), TRUE);
// Skip CurrencyExchanger, because it is a utility/service and not a
// regular plugin. It should never be part of the configuration anyway.
// This unset() is just a fail-safe.
unset($configuration['CurrencyExchanger']);
return $configuration;
}