You are here

function field_group_display_overview_row_region in Field Group 7.2

Same name and namespace in other branches
  1. 8.3 includes/field_ui.inc \field_group_display_overview_row_region()
  2. 8 includes/field_ui.inc \field_group_display_overview_row_region()
  3. 7 field_group.field_ui.inc \field_group_display_overview_row_region()

Returns the region to which a row in the 'Manage display' screen belongs.

Parameters

Array $row A field or field_group row:

Return value

String the current region.

1 string reference to 'field_group_display_overview_row_region'
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.

File

./field_group.field_ui.inc, line 491
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_display_overview_row_region($row) {
  switch ($row['#row_type']) {
    case 'group':
      return $row['format']['type']['#value'] == 'hidden' ? 'hidden' : 'visible';
    case 'add_new_group':

      // If no input in 'label', assume the row has not been dragged out of the
      // 'add new' section.
      if (empty($row['label']['#value'])) {
        return 'add_new';
      }
      return $row['format']['type']['#value'] == 'hidden' ? 'hidden' : 'visible';
  }
}