Copies configuration objects from source storage to target storage.
\Drupal\Core\Config\StorageInterface $source_storage: The source config storage service.
\Drupal\Core\Config\StorageInterface $target_storage: The target config storage service.
public function copyConfig(StorageInterface $source_storage, StorageInterface $target_storage) {
$target_storage
->deleteAll();
foreach ($source_storage
->listAll() as $name) {
$target_storage
->write($name, $source_storage
->read($name));
}
}