You are here

function field_group_field_info_max_weight in Field Group 7

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

Implements hook_field_info_max_weight().

File

./field_group.field_ui.inc, line 715
Field_group.field_ui.inc is a file that contains most functions needed on the Fields UI Manage forms (display and fields).

Code

function field_group_field_info_max_weight($entity_type, $bundle, $context) {
  $weights = array();
  foreach (field_group_info_groups($entity_type, $bundle, $context) as $group) {
    $weights[] = $group->weight;
  }
  return $weights ? max($weights) : NULL;
}