You are here

function token_test_token_list in Token 6

Implements hook_token_list().

File

tests/token_test.module, line 19

Code

function token_test_token_list($type = 'all') {
  $tokens = array();
  if ($type == 'all' || $type == 'global') {

    // Provide some wildcard tokens
    $tokens['token_test']['alpha'] = t("Token test Alpha.");
    $tokens['token_test']['beta-N'] = t("Token test Beta with wildcard.");
    $tokens['token_test']['gamma_?'] = t("Token test Gamme with wildcard.");
    $tokens['token_test']['delta-?'] = t("Token test Delta with wildcard.");
    $tokens['token_test']['epsilon-zeta-????'] = t("Token test Epsilon-Zeta with wildcard.");

    // Provide a token that returns a different value to test $options caching.
    $tokens['token_test']['option-foo'] = t('A token with various values.');
  }
  return $tokens;
}