You are here

function fieldgroup_get_group in Content Construction Kit (CCK) 6.3

Same name and namespace in other branches
  1. 5 fieldgroup.module \fieldgroup_get_group()
  2. 6 modules/fieldgroup/fieldgroup.module \fieldgroup_get_group()
  3. 6.2 modules/fieldgroup/fieldgroup.module \fieldgroup_get_group()

Get the group name for a field. If the field isn't in a group, FALSE will be returned.

Return value

The name of the group, or FALSE.

2 calls to fieldgroup_get_group()
content_copy_export in modules/content_copy/content_copy.module
Process the export, get field admin forms for all requested fields and save the form values as formatted text.
content_multigroup_field_basic_form in modules/content_multigroup/content_multigroup.admin.inc
Alter the basic field settings form.

File

modules/fieldgroup/fieldgroup.module, line 971
Create field groups for CCK fields.

Code

function fieldgroup_get_group($content_type, $field_name) {
  foreach (fieldgroup_groups($content_type) as $group_name => $group) {
    if (in_array($field_name, array_keys($group['fields']))) {
      return $group_name;
    }
  }
  return FALSE;
}