You are here

function currency_api_admin_settings in Currency 6

Same name and namespace in other branches
  1. 5 currency_api/currency_api.module \currency_api_admin_settings()
  2. 7 currency_api/currency_api.module \currency_api_admin_settings()

Menu callback; module settings form.

1 string reference to 'currency_api_admin_settings'
currency_api_menu in currency_api/currency_api.module
Implementation of hook_menu().

File

currency_api/currency_api.module, line 51
This module provides an API for currency conversion.

Code

function currency_api_admin_settings() {
  $form['currency_api_watchdog'] = array(
    '#type' => 'checkbox',
    '#title' => t('Log all currency exchange requests to watchdog'),
    '#default_value' => variable_get('currency_api_watchdog', 1),
  );
  $period = drupal_map_assoc(array(
    900,
    1800,
    3600,
    10800,
    21600,
    32400,
    43200,
    86400,
  ), 'format_interval');
  $form['currency_api_fetch'] = array(
    '#type' => 'select',
    '#title' => t('Currency data update frequency'),
    '#default_value' => variable_get('currency_api_fetch', UPDATE_FREQUENCY),
    '#options' => $period,
    '#description' => t('How long to keep the currency data from Yahoo! Finance. Default is 1 hour (3600 seconds).'),
  );
  return system_settings_form($form);
}