catch (FileException
$e) { // Ignore failed deletes.
} $archiver =
new ArchiveTar($this->fileSystem->
getTempDirectory() . '/config.tar.gz', 'gz'
);
// Add all contents of the export storage to the archive.
foreach ($this->exportStorage->
listAll() as $name) { $archiver->
addString("
$name.yml", Yaml::
encode($this->exportStorage->
read($name)));
} // Get all data from the remaining collections.
foreach ($this->exportStorage->
getAllCollectionNames() as $collection) { $collection_storage =
$this->exportStorage->
createCollection($collection);
foreach ($collection_storage->
listAll() as $name) { $archiver->
addString(str_replace('.', '/',
$collection) . "/
$name.yml", Yaml::
encode($collection_storage->
read($name)));
} } $request =
new Request(['file' => 'config.tar.gz'
]);
return $this->fileDownloadController->
download($request, 'temporary'
);
} /**
* Shows diff of specified configuration file.
*
* @param string $source_name
* The name of the configuration file.
* @param string $target_name
* (optional) The name of the target configuration file if different from
* the $source_name.
* @param string $collection
* (optional) The configuration collection name. Defaults to the default
* collection.
*
* @return array
* Table showing a two-way diff between the active and staged configuration.
*/