You are here

function computed_field_token_values in Computed Field 6

Same name and namespace in other branches
  1. 5 computed_field.module \computed_field_token_values()

Implementation of hook_token_values()

File

./computed_field.module, line 445

Code

function computed_field_token_values($type, $object = NULL, $options = array()) {
  if ($type == 'field') {
    $item = $object[0];
    $tokens['raw'] = $item['value'];
    $tokens['formatted'] = $item['view'];
    return $tokens;
  }
}