You are here

function field_group_load_field_group in Field Group 7

Same name and namespace in other branches
  1. 8.3 field_group.module \field_group_load_field_group()
  2. 8 field_group.module \field_group_load_field_group()
  3. 7.2 field_group.module \field_group_load_field_group()

Loads a group definition.

Parameters

$group_name: The name of the group.

$entity_type: The name of the entity.

$bundle_name: The name of the bundle.

$mode: The view mode to load.

3 calls to field_group_load_field_group()
field_group_field_ui_overview_form_alter in ./field_group.field_ui.inc
Function to alter the fields overview and display overview screen.
field_group_load_field_group_by_identifier in ./field_group.module
Ctools load callback to load fieldgroup by identifier.
field_group_menu_load in ./field_group.module
Menu Wildcard loader function to load group definitions.

File

./field_group.module, line 151
Fieldgroup module.

Code

function field_group_load_field_group($group_name, $entity_type, $bundle_name, $mode) {
  ctools_include('export');
  $objects = ctools_export_load_object('field_group', 'conditions', array(
    'group_name' => $group_name,
    'entity_type' => $entity_type,
    'bundle' => $bundle_name,
    'mode' => $mode,
  ));
  $object = array_shift($objects);
  if ($object && isset($object->data)) {
    return field_group_unpack($object);
  }
  return $object;
}