You are here

function bootstrap_fieldgroup_field_group_formatter_info in Bootstrap fieldgroup 7

Implements hook_field_group_formatter_info().

File

./bootstrap_fieldgroup.module, line 37
Module file for the bootstrap_fieldgroup module.

Code

function bootstrap_fieldgroup_field_group_formatter_info() {
  $formatters = array();
  $formatters['bootstrap_fieldgroup_nav'] = array(
    'label' => t('Bootstrap nav: tabs/pills'),
    'description' => t('This fieldgroup renders child groups as Bootstrap nav tabs/pills'),
    'instance_settings' => array(
      'classes' => '',
      'bootstrap_nav_type' => 'tabs',
      'bootstrap_stacked' => 0,
      'bootstrap_orientation' => 0,
    ),
  );
  $formatters['bootstrap_fieldgroup_nav_item'] = array(
    'label' => t('Bootstrap nav: item'),
    'description' => t('This fieldgroup renders the content as a Bootstrap nav item'),
    'instance_settings' => array(
      'classes' => '',
    ),
  );
  $formatters['bootstrap_fieldgroup_accordion'] = array(
    'label' => t('Bootstrap Accordion group'),
    'description' => t('This fieldgroup renders child groups as Bootstrap Accordion.'),
    'instance_settings' => array(
      'classes' => '',
      'id' => '',
    ),
  );
  $formatters['bootstrap_fieldgroup_accordion_item'] = array(
    'label' => t('Bootstrap Accordion item'),
    'format_types' => array(
      'open',
      'closed',
    ),
    'description' => t('This fieldgroup renders the contentin a div, part of Bootstrap Accordion group.'),
    'default_formatter' => 'closed',
    'instance_settings' => array(
      'classes' => '',
    ),
  );
  $formatters['bootstrap_grid_row'] = array(
    'label' => t('Bootstrap Grid Row'),
    'description' => t('This fieldgroup renders a Bootstrap row that is meant to include Bootstrap columns as child groups. It can optionally render a heading (title and description) as a child column.'),
    'instance_settings' => array(
      'classes' => '',
      'show_heading' => 0,
      'heading_position' => 0,
      'label_element' => 'h3',
      'description_element' => 'p',
      'description' => '',
      'panelize' => 0,
      'bootstrap_grid_col_xs' => '',
      'bootstrap_grid_col_sm' => '',
      'bootstrap_grid_col_md' => '',
      'bootstrap_grid_col_lg' => '',
    ),
  );
  $formatters['bootstrap_grid_col'] = array(
    'label' => t('Bootstrap Grid Column'),
    'description' => t('This fieldgroup renders the content inside a Bootstrap column with the specified column classes. It can optionally wrap the fields inside a panel.'),
    'instance_settings' => array(
      'classes' => '',
      'panelize' => 0,
      'bootstrap_grid_col_xs' => '',
      'bootstrap_grid_col_sm' => '',
      'bootstrap_grid_col_md' => '',
      'bootstrap_grid_col_lg' => '',
    ),
  );
  foreach (array_keys($formatters) as $key) {
    $formatter =& $formatters[$key];
    $formatter['instance_settings']['required_fields'] = 1;
  }
  return array(
    'form' => $formatters,
    'display' => $formatters,
  );
}