function fieldgroup_token_values in Custom Formatters 6
Implements hook_token_values().
File
- includes/
fieldgroup.inc, line 129 - Fieldgroup module integration.
Code
function fieldgroup_token_values($type, $object = array()) {
$values = array();
if ($type == 'field') {
foreach (fieldgroup_groups() as $groups) {
foreach ($groups as $group) {
if ($group['group_type'] == 'standard') {
foreach ($group['fields'] as $field) {
if (isset($object[0][$field['field_name']])) {
$values["fieldgroup-{$field['field_name']}"] = $object[0][$field['field_name']]['view'];
}
}
}
}
}
}
return $values;
}