Commit 598cb86d authored by sun's avatar sun Committed by gdd

Added DrupalConfigStorageInterface::writeToFile().

write() called into copyToFile() previously, which needlessly re-loaded the configuration data from the active storage, whereas the data is already available.
parent b068ec40
......@@ -41,7 +41,7 @@ protected function signedFileStorage() {
* Implements DrupalConfigVerifiedStorageInterface::copyToFile().
*/
public function copyToFile() {
return $this->signedFileStorage()->write($this->read());
return $this->writeToFile($this->read());
}
/**
......@@ -80,7 +80,14 @@ public function isOutOfSync() {
*/
public function write($data) {
$this->writeToActive($data);
$this->copyToFile();
$this->writeToFile($data);
}
/**
* Implements DrupalConfigVerifiedStorageInterface::writeToFile().
*/
public function writeToFile($data) {
return $this->signedFileStorage()->write($data);
}
/**
......
......@@ -47,6 +47,14 @@ function deleteFile();
*/
function isOutOfSync();
/**
* Writes the configuration data into the active storage and the file.
*
* @param $data
* The configuration data to write.
*/
function write($data);
/**
* Writes the configuration data into the active storage but not the file.
*
......@@ -59,12 +67,12 @@ function isOutOfSync();
function writeToActive($data);
/**
* Writes the configuration data into the active storage and the file.
* Writes the configuration data into the file.
*
* @param $data
* The configuration data to write.
* The configuration data to write into the file.
*/
function write($data);
function writeToFile($data);
/**
* Gets names starting with this prefix.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment