1 field_group.field_ui.inc field_group_delete_form_submit(array $form, array &$form_state)

Remove group from bundle.

Parameters

array $form: An associative array containing the structure of the form.

array $form_state: An associative array containing the current state of the form, which is passed by reference.

File

core/modules/field_group/field_group.field_ui.inc, line 943
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_delete_form_submit(array $form, array &$form_state) {
  $group = $form['#group'];
  $bundle = $group->bundle;
  $entity_type = $group->entity_type;
  $group->mode = $form_state['build_info']['args'][1];
  $bundles = (array) field_info_bundles();
  $bundle_label = $bundles[$entity_type][$bundle]['label'];
  field_group_group_delete($group);
  backdrop_set_message(t('The group %group has been deleted from the %type content type.', array(
    '%group' => t($group->label), '%type' => $bundle_label,
  )));
  // Redirect.
  $form_state['redirect'] = $form['#redirect'];
}