protected function ConfigurationExportManager::dumpConfiguration in Configuration Management 7.3
1 call to ConfigurationExportManager::dumpConfiguration()
File
- src/
Helpers/ ConfigurationExportManager.php, line 208 - ConfigurationExportManager.php handles the export of configurations.
Class
Namespace
Configuration\HelpersCode
protected function dumpConfiguration(Configuration $configuration, $config_path, $export_format) {
$handler = $this->configuration_manager
->getHandler($configuration);
$relative_path = $handler
->getExportPath($configuration);
$path = $config_path . '/' . $relative_path;
$this
->createDirectory($path);
$file_path = $path . $configuration
->getIdentifier() . '.' . $export_format;
$export = $handler
->export($configuration, $export_format);
if (!isset($this->exported[$configuration
->getGroup()])) {
$this->exported[$configuration
->getGroup()] = array();
}
$this->modules = array_merge($this->modules, $configuration
->getModules(), $configuration
->getAdditionalModules());
$this->exported[$configuration
->getGroup()][$configuration
->getIdentifier()] = array(
'hash' => sha1($export),
'path' => $relative_path . $configuration
->getIdentifier() . '.' . $export_format,
);
//echo "$file_path\n";
if ($this->fast_export) {
file_put_contents($file_path, $export);
}
else {
$this->fs
->dumpFile($file_path, $export);
}
}