You are here

function flexiform_entity_form_row_region in Flexiform 7

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

This function is used as a #row_callback in field_ui_field_overview_form(), and is called during field_ui_table_pre_render().

1 string reference to 'flexiform_entity_form_row_region'
flexiform_manage_form_entities_form in ./flexiform.admin.inc
flexiform_manage_form_entities_form

File

./flexiform.admin.inc, line 2010
Model type editing UI.

Code

function flexiform_entity_form_row_region($row) {
  switch ($row['#row_type']) {
    case 'entity':
      return 'main';
    case 'add_entity':

      // If no input in 'label', assume the row has not been dragged out of the
      // 'add new' section.
      return !empty($row['label']['#value']) ? 'main' : 'add_new';
  }
}