function purge_tokens_token_info in Purge 8.3
Implements hook_token_info().
File
- modules/
purge_tokens/ purge_tokens.module, line 14 - Purge Tokens - Adds tokens support for external cache invalidation.
Code
function purge_tokens_token_info() {
return [
'types' => [
'invalidation' => [
'name' => t('Cache invalidation'),
'description' => t('Tokens related to cache invalidation of individual items.'),
'needs-data' => 'invalidation',
],
'invalidations' => [
'name' => t('Cache invalidations'),
'description' => t('Tokens related to mass cache invalidation.'),
'needs-data' => 'invalidations',
],
],
'tokens' => [
'invalidation' => [
'expression' => [
'name' => t("Expression"),
'description' => t("A string the cache invalidation instruction is expressed in, for instance '<code>http://site.com/url</code>' for URL invalidations or '<code>tag:1</code>' for tags."),
],
'type' => [
'name' => t("Type"),
'description' => t("The type of invalidation by plugin ID, for instance <code>tag</code>, <code>wildcardpath</code> or <code>url</code>."),
],
],
'invalidations' => [
'separated_pipe' => [
'name' => t("Pipe separated"),
'description' => t("Merged list of all expressions, for example <code>tag:1|tag:2|path/4|http://url5|tag:6</code>."),
],
'separated_comma' => [
'name' => t("Comma separated"),
'description' => t("Merged list of all expressions, for example <code>tag:1,tag:2,path/4,http://url5,tag:6</code>."),
],
'separated_tab' => [
'name' => t("Tab separated"),
'description' => t("Merged list of all expressions, for example <code>tag:1\ttag:2\tpath/4</code>."),
],
],
],
];
}