You are here

function fieldgroup_token_list in Custom Formatters 6

Implements hook_token_list().

File

includes/fieldgroup.inc, line 110
Fieldgroup module integration.

Code

function fieldgroup_token_list($type = 'all') {
  $tokens = array(
    'fieldgroup' => array(),
  );
  foreach (fieldgroup_groups() as $groups) {
    foreach ($groups as $group) {
      if ($group['group_type'] == 'standard') {
        foreach ($group['fields'] as $field) {
          $tokens['fieldgroup']["fieldgroup-{$field['field_name']}"] = t('Themed results of the "!field" field.', array(
            '!field' => $field['label'],
          ));
        }
      }
    }
  }
  return $tokens;
}