You are here

function devel_reinstall in Devel 7

Same name and namespace in other branches
  1. 5 devel.module \devel_reinstall()
  2. 6 devel.module \devel_reinstall()

Form constructor for reinstalling any module from a dropdown.

See also

devel_reinstall_submit()

1 string reference to 'devel_reinstall'
devel_menu in ./devel.module
Implements hook_menu().

File

./devel.pages.inc, line 137
Page callbacks for Devel.

Code

function devel_reinstall($form, &$form_state) {
  $output = '';
  $modules = module_list();
  sort($modules);
  $options = drupal_map_assoc($modules);
  $form['list'] = array(
    '#type' => 'checkboxes',
    '#options' => $options,
    '#description' => t('Uninstall and then install the selected modules. <code>hook_uninstall()</code> and <code>hook_install()</code> will be executed and the schema version number will be set to the most recent update number. You may have to manually clear out any existing tables first if the module doesn\'t implement <code>hook_uninstall()</code>.'),
  );
  $form['actions'] = array(
    '#type' => 'actions',
  );
  $form['actions']['submit'] = array(
    '#value' => t('Reinstall'),
    '#type' => 'submit',
  );
  return $form;
}