function field_group_info_groups in Field Group 7.2
Same name in this branch
- 7.2 field_group.api.php \field_group_info_groups()
- 7.2 field_group.module \field_group_info_groups()
Same name and namespace in other branches
- 8.3 field_group.module \field_group_info_groups()
- 8 field_group.module \field_group_info_groups()
- 7 field_group.api.php \field_group_info_groups()
- 7 field_group.module \field_group_info_groups()
Get all groups.
Parameters
$entity_type: The name of the entity.
$bundle: The name of the bundle.
$view_mode: The view mode.
$reset.: Whether to reset the cache or not.
7 calls to field_group_info_groups()
- field_group_attach_groups in ./
field_group.module - Attach groups to the (form) build.
- field_group_field_info_max_weight in ./
field_group.field_ui.inc - Implements hook_field_info_max_weight().
- field_group_field_overview_submit in ./
field_group.field_ui.inc - Submit handler for the overview screens.
- field_group_field_ui_form_params in ./
field_group.field_ui.inc - Helper function to get the form parameters to use while building the fields and display overview form.
- GroupUITestCase::createGroup in ./
field_group.test - Creates a group on the article content type.
File
- ./
field_group.module, line 1362 - Fieldgroup module.
Code
function field_group_info_groups($entity_type = NULL, $bundle = NULL, $view_mode = NULL, $reset = FALSE) {
static $groups = FALSE;
if (!$groups || $reset) {
if (!$reset && ($cached = cache_get('field_groups', 'cache_field'))) {
$groups = $cached->data;
}
else {
drupal_static_reset('ctools_export_load_object');
drupal_static_reset('ctools_export_load_object_all');
$groups = field_group_read_groups();
cache_set('field_groups', $groups, 'cache_field');
}
}
if (!isset($entity_type)) {
return $groups;
}
else {
if (isset($groups[$entity_type][$bundle][$view_mode])) {
return $groups[$entity_type][$bundle][$view_mode];
}
else {
return array();
}
}
}