function support_ticket_token_info in Support Ticketing System 8
Implements hook_token_info().
File
- modules/
support_ticket/ support_ticket.tokens.inc, line 16 - Builds placeholder replacement tokens for support_ticket-related data.
Code
function support_ticket_token_info() {
$type = array(
'name' => t('Support tickets'),
'description' => t('Tokens related to individual support tickets.'),
'needs-data' => 'support_ticket',
);
// Tokens for support tickets.
$support_ticket['stid'] = array(
'name' => t("Support ticket ID"),
'description' => t('The unique ID of the support ticket.'),
);
$support_ticket['vid'] = array(
'name' => t("Revision ID"),
'description' => t("The unique ID of the support ticket's latest revision."),
);
$support_ticket['type'] = array(
'name' => t("Support ticket type"),
);
$support_ticket['type-name'] = array(
'name' => t("Support ticket type name"),
'description' => t("The human-readable name of the support ticket type."),
);
$support_ticket['title'] = array(
'name' => t("Title"),
);
$support_ticket['body'] = array(
'name' => t("Ticket body"),
'description' => t("The main body text of the support ticket."),
);
$support_ticket['summary'] = array(
'name' => t("Summary"),
'description' => t("The summary of the support ticket's main body text."),
);
$support_ticket['langcode'] = array(
'name' => t('Language code'),
'description' => t('The language code of the language the support ticket is written in.'),
);
$support_ticket['url'] = array(
'name' => t("URL"),
'description' => t("The URL of the support ticket."),
);
$support_ticket['edit-url'] = array(
'name' => t("Edit URL"),
'description' => t("The URL of the support ticket's edit page."),
);
// Chained tokens for support tickets.
$support_ticket['created'] = array(
'name' => t("Date created"),
'type' => 'date',
);
$support_ticket['changed'] = array(
'name' => t("Date changed"),
'description' => t("The date the support ticket was most recently updated."),
'type' => 'date',
);
$support_ticket['author'] = array(
'name' => t("Author"),
'type' => 'user',
);
return array(
'types' => array(
'support_ticket' => $type,
),
'tokens' => array(
'support_ticket' => $support_ticket,
),
);
}