| 1 field_group.field_ui.inc | field_group_delete_form(array $form, array &$form_state, $group, $view_mode = 'form') |
Menu callback; present a form for removing a group.
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.
object $group: A group definition.
string $view_mode: The display mode.
Return value
array: A form render array.
File
- core/
modules/ field_group/ field_group.field_ui.inc, line 920 - 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(array $form, array &$form_state, $group, $view_mode = 'form') {
$form['#group'] = $group;
$admin_path = _field_group_get_admin_path($group->entity_type, $group->bundle, $view_mode);
$form['#redirect'] = array($admin_path);
$output = confirm_form($form,
t('Are you sure you want to delete the group %group?', array('%group' => t($group->label))),
$admin_path,
t('This action cannot be undone.'),
t('Delete'), t('Cancel'),
'confirm'
);
return $output;
}