function StorageComparer::writeMode

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Config/StorageComparer.php \Drupal\Core\Config\StorageComparer::writeMode()

Changes the StorageComparer to write mode.

Tells the StorageComparer that the target storage is going to be used for writing. This information allows implementations to optimize caching strategies for reading from or writing to the target storage.

Return value

$this

Overrides StorageComparerInterface::writeMode

File

core/lib/Drupal/Core/Config/StorageComparer.php, line 180

Class

StorageComparer
Defines a config storage comparer.

Namespace

Drupal\Core\Config

Code

public function writeMode() : static {
    if (!$this->writeMode) {
        $this->writeMode = TRUE;
        $this->targetCacheStorage = new NullBackend('storage_comparer');
        $this->targetStorages = [];
    }
    return $this;
}

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