X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fchi-teck%2Fdrupal-code-generator%2Ftemplates%2Fd7%2Fhook%2Ftoken_info_alter.twig;fp=vendor%2Fchi-teck%2Fdrupal-code-generator%2Ftemplates%2Fd7%2Fhook%2Ftoken_info_alter.twig;h=911b98bb476606be168b6daf35c022be1672d61f;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/token_info_alter.twig b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/token_info_alter.twig new file mode 100644 index 000000000..911b98bb4 --- /dev/null +++ b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/token_info_alter.twig @@ -0,0 +1,21 @@ +/** + * Implements hook_token_info_alter(). + */ +function {{ machine_name }}_token_info_alter(&$data) { + // Modify description of node tokens for our site. + $data['tokens']['node']['nid'] = array( + 'name' => t("Node ID"), + 'description' => t("The unique ID of the article."), + ); + $data['tokens']['node']['title'] = array( + 'name' => t("Title"), + 'description' => t("The title of the article."), + ); + + // Chained tokens for nodes. + $data['tokens']['node']['created'] = array( + 'name' => t("Date created"), + 'description' => t("The date the article was posted."), + 'type' => 'date', + ); +}