You are here

function flag_lists_token_info_alter in Flag Lists 8

Same name and namespace in other branches
  1. 4.0.x flag_lists.tokens.inc \flag_lists_token_info_alter()

Implements hook_token_info_alter().

File

./flag_lists.tokens.inc, line 25
Flag lists module tokens support.

Code

function flag_lists_token_info_alter(&$data) {

  //
  // Flagging collection tokens.
  //
  // Nothing has to be done as every field from the entities
  // are automagically included.
  $data['types']['flagging_collection'] = [
    'name' => t('Flagging Collection'),
    'description' => t('Tokens related to flagging collection data.'),
    'needs-data' => 'flagging_collection',
  ];
  $data['types']['flag_list_item'] = [
    'name' => t('Flag List Items'),
    'description' => t('Tokens related to flag list items.'),
    'needs-data' => 'flag_list_item',
  ];
}