function piwik_token_info in Piwik Web Analytics 8
Same name and namespace in other branches
- 7.2 piwik.tokens.inc \piwik_token_info()
Implements hook_token_info().
File
- ./
piwik.tokens.inc, line 14 - Builds placeholder replacement tokens for user-related data.
Code
function piwik_token_info() {
$user['piwik-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['piwik-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,
],
];
}