function hook_subscriptions_tokens_list in Subscriptions 6
Provide a list of token names and descriptions for Mail Editor to display.
The parameters are passed straight through from Mail Editor's hook_mail_edit_tokens_list($mailkey, $options = array())
Related topics
2 functions implement hook_subscriptions_tokens_list()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- subscriptions_cck_subscriptions_tokens_list in ./
subscriptions_cck.module - Implementation of hook_subscriptions_tokens_list().
- subscriptions_mail_subscriptions_tokens_list in ./
subscriptions_mail.module - Implementation of hook_subscriptions_tokens_list().
1 invocation of hook_subscriptions_tokens_list()
- subscriptions_content_mail_edit_tokens_list in ./
subscriptions_content.module - Implementation of hook_mail_edit_tokens_list().
File
- docs/
docs.php, line 30 - This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.
Code
function hook_subscriptions_tokens_list($mailkey, $options = array()) {
$tokens = array();
switch ($mailkey) {
case 'digest':
// For digests:
$tokens += array(
'!digest_count' => t('The number of notifications in the digest.'),
);
break;
default:
// For all other Subscriptions mailkeys:
$tokens += array(
'!nid' => t('The NID of the node.'),
);
}
return $tokens;
}