function RecipeCommand::rollBackToCheckpoint
Same name in this branch
- main core/lib/Drupal/Core/Recipe/RecipeCommand.php \Drupal\Core\Recipe\RecipeCommand::rollBackToCheckpoint()
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Recipe/RecipeCommand.php \Drupal\Core\Recipe\RecipeCommand::rollBackToCheckpoint()
- 10 core/lib/Drupal/Core/Recipe/RecipeCommand.php \Drupal\Core\Recipe\RecipeCommand::rollBackToCheckpoint()
- 11.x core/lib/Drupal/Core/Recipe/Command/RecipeCommand.php \Drupal\Core\Recipe\Command\RecipeCommand::rollBackToCheckpoint()
Rolls config back to a particular checkpoint.
Parameters
\Drupal\Core\Config\Checkpoint\Checkpoint $checkpoint: The checkpoint to roll back to.
File
-
core/
lib/ Drupal/ Core/ Recipe/ Command/ RecipeCommand.php, line 160
Class
- RecipeCommand
- Applies recipe.
Namespace
Drupal\Core\Recipe\CommandCode
private function rollBackToCheckpoint(Checkpoint $checkpoint) : void {
$container = \Drupal::getContainer();
$this->checkpoint_storage
->setCheckpointToReadFrom($checkpoint);
assert($this->configStorage instanceof StorageInterface);
$storage_comparer = new StorageComparer($this->checkpoint_storage, $this->configStorage);
$storage_comparer->reset();
$container->get(ConfigImporterFactory::class)
->get($storage_comparer)
->import();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.