You are here

function locale_test_token_info in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/locale/tests/modules/locale_test/locale_test.module \locale_test_token_info()
  2. 10 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
Simulate a custom module with a local po file.

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;
}