1.20.x config_file_storage.inc | public ConfigFileStorage::exportArchive($file_uri) |
Export an archive of configuration files from the config storage managed by this object.
Parameters
string $file_uri: The URI of the tar archive file to create.
Return value
bool: TRUE on success, FALSE otherwise.
Throws
Overrides ConfigStorageInterface::exportArchive
File
- drivers/
config_file/ config_file_storage.inc, line 258
Class
- ConfigFileStorage
- Defines the file storage controller.
Code
public function exportArchive($file_uri) {
$archiver = new ArchiverTar($file_uri);
$config_files = array();
foreach ($this->listAll() as $config_name) {
$config_files[] = $this->directory . '/' . $config_name . '.json';
}
$archiver->getArchive()->createModify($config_files, '', $this->directory);
}