home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (token_test.module)

This example Drupal source code file (token_test.module) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

array, array_keys, as, data, debug, foreach, function, if, options, php, token, token_replace, token_test_exit

The token_test.module Drupal example source code


 * Implements hook_exit().
function token_test_exit() {
  if ($debug = variable_get('token_page_tokens', array())) {
    $debug += array('tokens' => array(), 'data' => array(), 'options' => array());
    foreach (array_keys($debug['tokens']) as $token) {
      $debug['values'][$token] = token_replace($token, $debug['data'], $debug['options']);
    variable_set('token_page_tokens', $debug);

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal token_test.module source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.