function CheckpointListInterface::add

Same name in other branches
  1. 10 core/lib/Drupal/Core/Config/Checkpoint/CheckpointListInterface.php \Drupal\Core\Config\Checkpoint\CheckpointListInterface::add()

Adds a new checkpoint.

Parameters

string $id: The ID of the checkpoint add.

string|\Stringable $label: The checkpoint label.

Return value

\Drupal\Core\Config\Checkpoint\Checkpoint The new checkpoint, which is now at the end of the checkpoint sequence.

Throws

\Drupal\Core\Config\Checkpoint\CheckpointExistsException Thrown when the ID already exists.

1 method overrides CheckpointListInterface::add()
LinearHistory::add in core/lib/Drupal/Core/Config/Checkpoint/LinearHistory.php

File

core/lib/Drupal/Core/Config/Checkpoint/CheckpointListInterface.php, line 65

Class

CheckpointListInterface
Maintains a list of checkpoints.

Namespace

Drupal\Core\Config\Checkpoint

Code

public function add(string $id, string|\Stringable $label) : Checkpoint;

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