function currency_form_currency_exchanger_submit in Currency 7.2
Implements form submit callback.
See also
currency_form_currency_exchangers()
File
- currency/
currency.module, line 807 - Provides currency information and allows users to add custom currencies.
Code
function currency_form_currency_exchanger_submit(array $form, array &$form_state) {
uasort($form_state['values']['exchangers'], 'drupal_sort_weight');
$configuration = array();
foreach ($form_state['values']['exchangers'] as $name => $exchanger_configuration) {
$configuration[$name] = (bool) $exchanger_configuration['enabled'];
}
CurrencyExchanger::saveConfiguration($configuration);
drupal_set_message(t('The configuration options have been saved.'));
}