You are here

function _rules_system_token_map_type in Rules 7.2

Looks for a token type mapping. Defaults to passing through the type.

Related topics

2 calls to _rules_system_token_map_type()
RulesTokenEvaluator::evaluate in modules/system.eval.inc
Evaluate tokens.
RulesTokenEvaluator::help in modules/system.eval.inc
Create documentation about the available replacement patterns.

File

modules/system.eval.inc, line 291
Contains rules integration for the system module needed during evaluation.

Code

function _rules_system_token_map_type($type) {
  $entity_info = entity_get_info();
  if (isset($entity_info[$type]['token type'])) {
    return $entity_info[$type]['token type'];
  }
  $cache = rules_get_cache();
  if (isset($cache['data_info'][$type]['token type'])) {
    return $cache['data_info'][$type]['token type'];
  }
  return $type;
}