You are here

function token_example_entity_info_alter in Examples for Developers 7

Implements hook_entity_info_alter().

@todo Remove this when the testbot can properly pick up dependencies for contrib modules.

Related topics

File

token_example/token_example.module, line 52
An example module showing how to define and use tokens.

Code

function token_example_entity_info_alter(&$info) {
  if (isset($info['taxonomy_term'])) {
    $info['taxonomy_term']['token type'] = 'term';
  }
  if (isset($info['taxonomy_vocabulary'])) {
    $info['taxonomy_vocabulary']['token type'] = 'vocabulary';
  }
}