function CheckpointStorage::setCheckpointToReadFrom

Same name and namespace in other branches
  1. 10 core/lib/Drupal/Core/Config/Checkpoint/CheckpointStorage.php \Drupal\Core\Config\Checkpoint\CheckpointStorage::setCheckpointToReadFrom()

Overrides CheckpointStorageInterface::setCheckpointToReadFrom

File

core/lib/Drupal/Core/Config/Checkpoint/CheckpointStorage.php, line 293

Class

CheckpointStorage
Provides a config storage that can make checkpoints.

Namespace

Drupal\Core\Config\Checkpoint

Code

public function setCheckpointToReadFrom(string|Checkpoint $checkpoint_id) : static {
    if ($checkpoint_id instanceof Checkpoint) {
        $checkpoint_id = $checkpoint_id->id;
    }
    $this->readFromCheckpoint = $this->checkpoints
        ->get($checkpoint_id);
    return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.