public function DevelCommands::reinstall in Devel 8.2
Same name and namespace in other branches
- 8.3 src/Commands/DevelCommands.php \Drupal\devel\Commands\DevelCommands::reinstall()
- 8 src/Commands/DevelCommands.php \Drupal\devel\Commands\DevelCommands::reinstall()
- 4.x src/Commands/DevelCommands.php \Drupal\devel\Commands\DevelCommands::reinstall()
Uninstall, and Install modules.
@command devel:reinstall
@aliases dre,devel-reinstall @allow-additional-options pm-uninstall,pm-enable
Parameters
$modules A comma-separated list of module names.:
File
- src/
Commands/ DevelCommands.php, line 73
Class
- DevelCommands
- For commands that are parts of modules, Drush expects to find commandfiles in __MODULE__/src/Commands, and the namespace is Drupal/__MODULE__/Commands.
Namespace
Drupal\devel\CommandsCode
public function reinstall($modules) {
$modules = StringUtils::csvToArray($modules);
$modules_str = implode(',', $modules);
drush_invoke_process('@self', 'pm:uninstall', [
$modules_str,
], []);
drush_invoke_process('@self', 'pm:enable', [
$modules_str,
], []);
}