function DevelCommands::reinstall

Same name in this branch
  1. 5.x src/Drush/Commands/DevelCommands.php \Drupal\devel\Drush\Commands\DevelCommands::reinstall()
Same name in other branches
  1. 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

string $modules: A comma-separated list of module names.

File

src/Commands/DevelCommands.php, line 104

Class

DevelCommands
Class DevelCommands.

Namespace

Drupal\devel\Commands

Code

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();
}