function LocaleTestHooks::tokenInfo
Implements hook_token_info().
File
-
core/
modules/ locale/ tests/ modules/ locale_test/ src/ Hook/ LocaleTestHooks.php, line 176
Class
- LocaleTestHooks
- Hook implementations for locale_test.
Namespace
Drupal\locale_test\HookCode
public function tokenInfo() {
$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.