interface CheckpointStorageInterface

Same name and namespace in other branches
  1. 10 core/lib/Drupal/Core/Config/Checkpoint/CheckpointStorageInterface.php \Drupal\Core\Config\Checkpoint\CheckpointStorageInterface

Provides an interface for checkpoint storages.

@internal This API is experimental.

Hierarchy

Expanded class hierarchy of CheckpointStorageInterface

All classes that implement CheckpointStorageInterface

1 file declares its use of CheckpointStorageInterface
CheckpointStorageTest.php in core/tests/Drupal/KernelTests/Core/Config/Storage/Checkpoint/CheckpointStorageTest.php

File

core/lib/Drupal/Core/Config/Checkpoint/CheckpointStorageInterface.php, line 15

Namespace

Drupal\Core\Config\Checkpoint
View source
interface CheckpointStorageInterface extends StorageInterface {
    
    /**
     * Creates a checkpoint, if required, and returns the active checkpoint.
     *
     * If the storage determines that the current active checkpoint would contain
     * the same information, it does not have to create a new checkpoint.
     *
     * @param string|\Stringable $label
     *   The checkpoint label to use if a new checkpoint is created.
     *
     * @return \Drupal\Core\Config\Checkpoint\Checkpoint
     *   The currently active checkpoint.
     */
    public function checkpoint(string|\Stringable $label) : Checkpoint;
    
    /**
     * Sets the checkpoint to read from.
     *
     * Calling read() or readMultiple() will return the configuration data at the
     * time of the checkpoint that was set here. If none is set, then the
     * configuration from the initial checkpoint will be returned.
     *
     * @param string|\Drupal\Core\Config\Checkpoint\Checkpoint $checkpoint_id
     *   The checkpoint ID to read from.
     *
     * @return $this
     *
     * @throws \Drupal\Core\Config\Checkpoint\UnknownCheckpointException
     *   Thrown when the provided checkpoint does not exist.
     */
    public function setCheckpointToReadFrom(string|Checkpoint $checkpoint_id) : static;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
CheckpointStorageInterface::checkpoint public function Creates a checkpoint, if required, and returns the active checkpoint. 1
CheckpointStorageInterface::setCheckpointToReadFrom public function Sets the checkpoint to read from. 1
StorageInterface::createCollection public function Creates a collection on the storage. 12
StorageInterface::decode public function Decodes configuration data from the storage-specific format. 12
StorageInterface::DEFAULT_COLLECTION constant The default collection name.
StorageInterface::delete public function Deletes a configuration object from the storage. 12
StorageInterface::deleteAll public function Deletes configuration objects whose names start with a given prefix. 12
StorageInterface::encode public function Encodes configuration data into the storage-specific format. 12
StorageInterface::exists public function Returns whether a configuration object exists. 12
StorageInterface::getAllCollectionNames public function Gets the existing collections. 12
StorageInterface::getCollectionName public function Gets the name of the current collection the storage is using. 12
StorageInterface::listAll public function Gets configuration object names starting with a given prefix. 12
StorageInterface::read public function Reads configuration data from the storage. 12
StorageInterface::readMultiple public function Reads configuration data from the storage. 12
StorageInterface::rename public function Renames a configuration object in the storage. 12
StorageInterface::write public function Writes configuration data to the storage. 12

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