public function ConfigSplitCliService::ioDeactivate in Configuration Split 2.0.x
Handle the deactivation interaction.
Parameters
string $split: The split name to deactivate.
\Drush\Style\DrushStyle|object $io: The $io interface of the cli tool calling.
callable $t: The translation function akin to t().
bool $confirmed: Whether the import is already confirmed by the console input.
File
- src/
ConfigSplitCliService.php, line 190
Class
- ConfigSplitCliService
- The CLI service class for interoperability.
Namespace
Drupal\config_splitCode
public function ioDeactivate(string $split, $io, callable $t, $confirmed = FALSE) : bool {
$config = $this
->getSplitFromArgument($split, $io, $t);
if ($config === NULL) {
return FALSE;
}
$message = $t('Deactivate the split config configuration?');
$storage = $this->manager
->singleDeactivate($config, FALSE);
if ($confirmed || $io
->confirm($message)) {
return $this
->tryImport($storage, $io, $t);
}
return TRUE;
}