$group) { if ($group->entity_type == $entity_type && $group->bundle == $bundle && in_array($field_name, $group->data['children'])) { $export['features']['field_group'][$group_id] = $group_id; } } } } //Add any parent field groups that haven't been selected. if (!empty($export['features']['field_group'])) { foreach ($export['features']['field_group'] as $id) { $group = isset($field_groups[$id]) ? $field_groups[$id] : FALSE; if ($group && !empty($group->parent_name)) { $parent_id = $group->parent_name . '|' . $group->entity_type . '|' . $group->bundle . '|' . $group->mode; $parent_group = isset($field_groups[$parent_id]) ? $field_groups[$parent_id] : FALSE; if ($parent_group && !isset($export['features']['field_group'][$parent_id])) { $export['features']['field_group'][$parent_id] = $parent_id; } } } if(empty($export['dependencies']['field_group'])) { $export['dependencies']['field_group'] = 'field_group'; } } }