[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/token/ -> token.module (summary)

(no description)

File Size: 918 lines (32 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 26 functions

  token_help()
  _token_core_supported_modules()
  token_menu()
  token_theme()
  token_token_values()
  token_token_list()
  token_include()
  token_replace()
  token_replace_multiple()
  token_get_values()
  token_get_list()
  token_prepare_tokens()
  _token_get_id()
  token_get_date_token_info()
  token_get_date_token_values()
  token_format_date()
  token_get_invalid_tokens_by_context()
  token_scan()
  token_element_validate()
  token_element_validate_token_context()
  token_find_duplicate_tokens()
  token_menu_link_load()
  token_book_link_load()
  _token_menu_link_translate()
  token_menu_link_get_parents_all()
  _menu_titles()

Functions
Functions that are not part of a class:

token_help($path, $arg)   X-Ref
Implements hook_help().


_token_core_supported_modules()   X-Ref
Return an array of the core modules supported by token.module.


token_menu()   X-Ref
Implements hook_menu().


token_theme()   X-Ref
Implements hook_theme().


token_token_values($type, $object = NULL)   X-Ref
Implements hook_token_values().


token_token_list($type = 'all')   X-Ref
Implements hook_token_list().


token_include()   X-Ref
General function to include the files that token relies on for the real work.


token_replace($text, $type = 'global', $object = NULL, $leading = TOKEN_PREFIX, $trailing = TOKEN_SUFFIX, $options = array()   X-Ref
Replace all tokens in a given string with appropriate values.

param: $text
param: $type
param: $object
param: $leading
param: $trailing
param: $options
param: $flush
return:

token_replace_multiple($text, $types = array('global' => NULL)   X-Ref
Replace all tokens in a given string with appropriate values.

Contrary to token_replace() this function supports replacing multiple types.

param: $text
param: $types
param: $leading
param: $trailing
param: $options
param: $flush
return:

token_get_values($type = 'global', $object = NULL, $flush = FALSE, $options = array()   X-Ref
Return a list of valid substitution tokens and their values for
the specified type.

param: $type
param: $object
param: $flush
param: $options
return:

token_get_list($types = 'all')   X-Ref
A helper function that retrieves all currently exposed tokens,
and merges them recursively. This is only necessary when building
the token listing -- during actual value replacement, only tokens
in a particular domain are requested and a normal array_marge() is
sufficient.

param: $types
return:

token_prepare_tokens($tokens = array()   X-Ref
A helper function to prepare raw tokens for replacement.

param: $tokens
param: $leading
param: $trailing
return:

_token_get_id($type = 'global', $object = NULL)   X-Ref
A helper function to return an object's ID for use in static caching.


token_get_date_token_info($description, $token_prefix = '')   X-Ref
Build a list of common date tokens for use in hook_token_list().

param: $description

token_get_date_token_values($timestamp = NULL, $token_prefix = '', $langcode = NULL)   X-Ref
Build a list of common date tokens for use in hook_token_values().


token_format_date($timestamp, $type = 'medium', $format = '', $timezone = NULL, $langcode = NULL)   X-Ref
A copy of format_date() that supports the 'N' date format character.


token_get_invalid_tokens_by_context($value, $valid_types = array()   X-Ref
Validate an tokens in raw text based on possible contexts.

param: $value
param: $valid_types
param: $leading
param: $trailing
return:

token_scan($text, $leading = TOKEN_PREFIX, $trailing = TOKEN_SUFFIX)   X-Ref
Build a list of all token-like patterns that appear in the text.

param: $text
param: $leading
param: $trailing
return:

token_element_validate(&$element, &$form_state)   X-Ref
Validate a form element that should have tokens in it.

Form elements that want to add this validation should have the #token_types
parameter defined.

For example:

token_element_validate_token_context(&$element, &$form_state)   X-Ref
Deprecated. Use token_element_validate() instead.


token_find_duplicate_tokens()   X-Ref
Find tokens that have been declared twice by different modules.


token_menu_link_load($mlid)   X-Ref
Get a translated menu link by its mlid, without access checking.

This function is a copy of menu_link_load() but with its own cache and a
simpler query to load the link. This also skips normal menu link access
checking by using _token_menu_link_translate().

param: $mlid
return:

token_book_link_load($mlid)   X-Ref
Get a translated book menu link by its mlid, without access checking.

This function is a copy of book_link_load() but with its own cache and a
simpler query to load the link. This also skips normal menu link access
checking by using _token_menu_link_translate().

param: $mlid
return:

_token_menu_link_translate(&$item)   X-Ref
No description

token_menu_link_get_parents_all($mlid)   X-Ref
Find all ancestors of a given menu link ID.

param: $mlid
return:

_menu_titles($menu_link, $nid)   X-Ref
Deprecated. Use the raw return value of token_menu_link_get_parents_all() instead.




Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7