function DevelCommands::reinstall

Same name in this branch
  1. 5.x src/Commands/DevelCommands.php \Drupal\devel\Commands\DevelCommands::reinstall()
Same name in other branches
  1. 4.x src/Commands/DevelCommands.php \Drupal\devel\Commands\DevelCommands::reinstall()

Uninstall, and Install modules.

File

src/Drush/Commands/DevelCommands.php, line 97

Class

DevelCommands

Namespace

Drupal\devel\Drush\Commands

Code

public function reinstall($modules) : void {
    
    /** @var \Drush\SiteAlias\ProcessManager $process_manager */
    $process_manager = $this->processManager();
    $modules = StringUtils::csvToArray($modules);
    $modules_str = implode(',', $modules);
    $process = $process_manager->drush($this->siteAliasManager
        ->getSelf(), PmCommands::UNINSTALL, [
        $modules_str,
    ]);
    $process->mustRun();
    $process = $process_manager->drush($this->siteAliasManager
        ->getSelf(), PmCommands::INSTALL, [
        $modules_str,
    ]);
    $process->mustRun();
}