public function DevelCommands::reinstall in Devel 4.x
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()
- 8.2 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
string $modules: A comma-separated list of module names.
File
- src/
Commands/ DevelCommands.php, line 93
Class
- DevelCommands
- Class DevelCommands.
Namespace
Drupal\devel\CommandsCode
public function reinstall($modules) {
$modules = StringUtils::csvToArray($modules);
$modules_str = implode(',', $modules);
$process = $this
->processManager()
->drush($this
->siteAliasManager()
->getSelf(), 'pm:uninstall', [
$modules_str,
]);
$process
->mustRun();
$process = $this
->processManager()
->drush($this
->siteAliasManager()
->getSelf(), 'pm:enable', [
$modules_str,
]);
$process
->mustRun();
}