Writes an array of config file changes from a source storage to a target storage.
array $config_changes: An array of changes to be written.
Drupal\Core\Config\StorageInterface $source_storage: The storage to synchronize configuration from.
Drupal\Core\Config\StorageInterface $target_storage: The storage to synchronize configuration to.
function config_sync_changes(array $config_changes, StorageInterface $source_storage, StorageInterface $target_storage) {
foreach (array(
'delete',
'create',
'change',
) as $op) {
foreach ($config_changes[$op] as $name) {
if ($op == 'delete') {
$target_storage
->delete($name);
}
else {
$data = $source_storage
->read($name);
$target_storage
->write($name, $data);
}
}
}
}