function locale_test_token_info

Same name in other branches
  1. 9 core/modules/locale/tests/modules/locale_test/locale_test.module \locale_test_token_info()
  2. 8.9.x core/modules/locale/tests/modules/locale_test/locale_test.module \locale_test_token_info()
  3. 11.x core/modules/locale/tests/modules/locale_test/locale_test.module \locale_test_token_info()

Implements hook_token_info().

File

core/modules/locale/tests/modules/locale_test/locale_test.module, line 176

Code

function locale_test_token_info() {
    $info = [];
    $info['types']['locale_test'] = [
        'name' => t('Locale test'),
        'description' => t('Locale test'),
    ];
    $info['tokens']['locale_test']['security_test1'] = [
        'type' => 'text',
        'name' => t('Security test 1'),
    ];
    $info['tokens']['locale_test']['security_test2'] = [
        'type' => 'text',
        'name' => t('Security test 2'),
    ];
    return $info;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.