You are here

function hook_commerce_multicurrency_exchange_rate_sync_provider_info in Commerce Multicurrency 7

Defines currency exchange rate sync providers.

Return value

array An array of information about the callback. The array contains a sub-array for each callback, with a machine name as the key. Possible attributes for each sub-array are:

  • title: The human readable title displayed in the settings form. Should be wrapped in t().
  • callback: The function to call. The function will receive the source currency as first and an array of target currencies as second parameter. As return an associative array keyed by the currency code with the rate as value is expected.
  • file: Optional. A file to include.
1 function implements hook_commerce_multicurrency_exchange_rate_sync_provider_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

commerce_multicurrency_commerce_multicurrency_exchange_rate_sync_provider_info in ./commerce_multicurrency.module
Implements hook_commerce_multicurrency_exchange_rate_sync_provider_info().
1 invocation of hook_commerce_multicurrency_exchange_rate_sync_provider_info()
commerce_multicurrency_commerce_multicurrency_exchange_rate_sync_provider in ./commerce_multicurrency.module
Returns currency exchange rate sync providers.

File

./commerce_multicurrency.api.php, line 26
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Code

function hook_commerce_multicurrency_exchange_rate_sync_provider_info() {
  return array(
    'ecb' => array(
      'title' => t('European Central Bank'),
      'callback' => 'commerce_multicurrency_exchange_rate_sync_provider_ecb',
      'file' => drupal_get_path('module', 'commerce_multicurrency') . '/commerce_multicurrency.ecb.inc',
    ),
  );
}