You are here

function currency_token_info in Currency 8.3

Same name and namespace in other branches
  1. 7.2 currency/currency.tokens.inc \currency_token_info()

Implements hook_token_info().

File

./currency.tokens.inc, line 13
Contains Token API hook implementations.

Code

function currency_token_info() {

  // Token groups.
  $types['currency'] = array(
    'name' => t('Currencies'),
    'needs-data' => 'currency',
  );

  // Tokens.
  $tokens['currency']['code'] = array(
    'description' => t('The (ISO 4217) currency code.'),
    'name' => t('Currency code'),
    'type' => 'text',
  );
  $tokens['currency']['number'] = array(
    'description' => t('The ISO 4217 currency number.'),
    'name' => t('Currency number'),
    'type' => 'text',
  );
  $tokens['currency']['subunits'] = array(
    'description' => t('The number of subunits.'),
    'name' => t('Subunits'),
    'type' => 'text',
  );
  $tokens['currency']['sign'] = array(
    'name' => t('Sign'),
    'type' => 'text',
  );
  $tokens['currency']['title'] = array(
    'name' => t('Name'),
    'type' => 'text',
  );
  return array(
    'tokens' => $tokens,
    'types' => $types,
  );
}