| 5 system.module | system_modules_uninstall_confirm_form( |
| 6 system.admin.inc | system_modules_uninstall_confirm_form($storage) |
| 7 system.admin.inc | system_modules_uninstall_confirm_form($storage) |
| 8 system.admin.inc | system_modules_uninstall_confirm_form($storage) |
Confirm uninstall of selected modules.
Parameters
$form_values Submitted form values.:
Return value
A form array representing modules to confirm.
1 call to system_modules_uninstall_confirm_form()
File
- modules/
system/ system.module, line 1651 - Configuration system that lets administrators modify the workings of the site.
Code
function system_modules_uninstall_confirm_form($form_values) {
// Nothing to build.
if (!isset($form_values)) {
return;
}
// Construct the hidden form elements and list items.
foreach (array_filter($form_values['uninstall']) as $module => $value) {
$info = _module_parse_info_file(dirname(drupal_get_filename('module', $module)) . '/' . $module . '.info');
$uninstall[] = $info['name'];
$form['uninstall'][$module] = array(
'#type' => 'hidden',
'#value' => 1,
);
}
// Display a confirm form if modules have been selected.
if (isset($uninstall)) {
$form['uninstall']['#tree'] = TRUE;
$form['#multistep'] = TRUE;
$form['modules'] = array('#value' => '<p>' . t('The following modules will be completely uninstalled from your site, and <em>all data from these modules will be lost</em>!') . '</p>' . theme('item_list', $uninstall));
$form = confirm_form(
$form,
t('Confirm uninstall'),
'admin/build/modules/uninstall',
t('Would you like to continue with uninstalling the above?'),
t('Uninstall'),
t('Cancel'));
return $form;
}
}
Login or register to post comments