function field_tools_get_group_code in Field tools 7
Retrieve a code representation of the given field group.
Parameters
object $group: A group object
Return value
string The code representation of the group
2 calls to field_tools_get_group_code()
- field_tools_bundle_export_form in ./
field_tools.admin.inc - Form to export all fields of a bundle.
- field_tools_group_export_form in ./
field_tools.admin.inc - Form to export a single group.
File
- ./
field_tools.admin.inc, line 968 - Contains admin callbacks for the Field tools module.
Code
function field_tools_get_group_code($group) {
// Unset group properties that are related to the current instance and should
// not be exported.
unset($group->id, $group->identifier, $group->bundle, $group->entity_type);
$group_name = $group->group_name;
ctools_include('export');
return '$groups[\'' . $group_name . '\'] = ' . ctools_var_export($group) . ';';
}