function theme_system_modules_uninstall
7.x system.admin.inc | theme_system_modules_uninstall( |
6.x system.admin.inc | theme_system_modules_uninstall($form) |
Themes a table of currently disabled modules.
Parameters
$form: The form array representing the currently disabled modules.
Return value
An HTML string representing the table.
Related topics
File
- drupal-6.x/
modules/ system/ system.admin.inc, line 2126 - Admin page callbacks for the system module.
Code
function theme_system_modules_uninstall($form) {
// No theming for the confirm form.
if (isset($form['confirm'])) {
return drupal_render($form);
}
// Table headers.
$header = array(t('Uninstall'),
t('Name'),
t('Description'),
);
// Display table.
$rows = array();
foreach (element_children($form['modules']) as $module) {
$rows[] = array(
array('data' => drupal_render($form['uninstall'][$module]), 'align' => 'center'),
'<strong>' . drupal_render($form['modules'][$module]['name']) . '</strong>',
array('data' => drupal_render($form['modules'][$module]['description']), 'class' => 'description'),
);
}
// Only display table if there are modules that can be uninstalled.
if (empty($rows)) {
$rows[] = array(array('data' => t('No modules are available to uninstall.'), 'colspan' => '3', 'align' => 'center', 'class' => 'message'));
}
$output = theme('table', $header, $rows);
$output .= drupal_render($form);
return $output;
}