You are here

public function DevelCommands::reinstall in Devel 8.3

Same name and namespace in other branches
  1. 8 src/Commands/DevelCommands.php \Drupal\devel\Commands\DevelCommands::reinstall()
  2. 8.2 src/Commands/DevelCommands.php \Drupal\devel\Commands\DevelCommands::reinstall()
  3. 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 93

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