module_test.tokens.inc

File

core/modules/system/tests/modules/module_test/module_test.tokens.inc

View source
<?php


/**
 * @file
 * Tests system_hook_info.
 */

declare (strict_types=1);

/**
 * Implements hook_token_info().
 */
function module_test_token_info() : array {
  $testToken = [];
  $testToken['types']['token_info_invoked'] = [
    'name' => 'tokens.inc test',
    'description' => 'tokens.inc test',
  ];
  $testToken['tokens']['token_info_invoked']['token_test_1'] = [
    'type' => 'text',
    'name' => 'tokens.inc test 1',
  ];
  return $testToken;
}

Functions

Title Deprecated Summary
module_test_token_info Implements hook_token_info().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.