Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / token_info_alter.twig
1 /**
2  * Implements hook_token_info_alter().
3  */
4 function {{ machine_name }}_token_info_alter(&$data) {
5   // Modify description of node tokens for our site.
6   $data['tokens']['node']['nid'] = array(
7     'name' => t("Node ID"),
8     'description' => t("The unique ID of the article."),
9   );
10   $data['tokens']['node']['title'] = array(
11     'name' => t("Title"),
12     'description' => t("The title of the article."),
13   );
14
15   // Chained tokens for nodes.
16   $data['tokens']['node']['created'] = array(
17     'name' => t("Date created"),
18     'description' => t("The date the article was posted."),
19     'type' => 'date',
20   );
21 }