function matomo_token_info in Matomo Analytics 8
Same name and namespace in other branches
- 7.2 matomo.tokens.inc \matomo_token_info()
Implements hook_token_info().
File
- ./
matomo.tokens.inc, line 14 - Builds placeholder replacement tokens for user-related data.
Code
function matomo_token_info() {
$user['matomo-role-names'] = [
'name' => t('User role names'),
'description' => t('The role names the user account is a member of as comma separated list.'),
'needs-data' => 'user',
];
$user['matomo-role-ids'] = [
'name' => t('User role ids'),
'description' => t('The role ids the user account is a member of as comma separated list.'),
'needs-data' => 'user',
];
return [
'tokens' => [
'user' => $user,
],
];
}