function apply_for_role_token_info in Apply for role 7
Same name and namespace in other branches
- 7.2 apply_for_role.token.inc \apply_for_role_token_info()
Implements hook_token_info().
File
- ./
apply_for_role.token.inc, line 11 - Token callbacks for the token module.
Code
function apply_for_role_token_info() {
$types['apply-for-role'] = array(
'name' => t("Apply for role"),
'description' => t("Tokens for role applications."),
);
// Role application tokens.
$apply['uid'] = array(
'name' => t("User ID"),
'description' => t("The applicant's user ID."),
);
$apply['name'] = array(
'name' => t("Name"),
'description' => t("The applicant's username."),
);
$apply['mail'] = array(
'name' => t("E-mail"),
'description' => t("The applicant's e-mail address."),
);
$apply['rid'] = array(
'name' => t("Role ID"),
'description' => t("The ID of the role being applied for."),
);
$apply['role'] = array(
'name' => t("Role"),
'description' => t("The name of the role being applied for."),
);
$apply['status'] = array(
'name' => t("Status"),
'description' => t("The status of the role being applied for."),
);
$apply['message'] = array(
'name' => t("Message"),
'description' => t("The message written by the role applicant."),
);
// Chained tokens for nodes.
$apply['applied'] = array(
'name' => t("Date applied"),
'description' => t("The date the application was posted."),
'type' => 'date',
);
$apply['processed'] = array(
'name' => t("Date processed"),
'description' => t("The date the application was processed."),
'type' => 'date',
);
return array(
'types' => $types,
'tokens' => array(
'apply-for-role' => $apply,
),
);
}