function field_group_field_ui_form_params in Field Group 8
Same name and namespace in other branches
- 8.3 includes/field_ui.inc \field_group_field_ui_form_params()
- 7.2 field_group.field_ui.inc \field_group_field_ui_form_params()
- 7 field_group.field_ui.inc \field_group_field_ui_form_params()
Helper function to get the form parameters to use while building the fields and display overview form.
Parameters
$form:
\Drupal\Core\Entity\EntityDisplayBase $display:
Return value
\stdClass
1 call to field_group_field_ui_form_params()
- field_group_field_ui_display_form_alter in includes/
field_ui.inc - Function to alter the display overview screens.
File
- includes/
field_ui.inc, line 24 - 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_ui_form_params($form, \Drupal\Core\Entity\EntityDisplayBase $display) {
$params = new stdClass();
$params->entity_type = $display
->getTargetEntityTypeId();
$params->bundle = $display
->getTargetBundle();
$params->region_callback = 'field_group_display_overview_row_region';
$params->mode = $display
->getMode();
$params->context = field_group_get_context_from_display($display);
$params->groups = array();
$params->groups = field_group_info_groups($params->entity_type, $params->bundle, $params->context, $params->mode);
// Gather parenting data.
$params->parents = array();
foreach ($params->groups as $name => $group) {
foreach ($group->children as $child) {
$params->parents[$child] = $name;
}
}
return $params;
}