public function Configuration::export in Configuration Management 7.2
File
- lib/
Drupal/ configuration/ Config/ Configuration.php, line 349 - Definition of Drupal\configuration\Config\Configuration.
Class
Namespace
Drupal\configuration\ConfigCode
public function export(ConfigIteratorSettings &$settings) {
$this
->build();
$modules = array_keys($this
->getRequiredModules());
// Save the configuration into a file.
$this->storage
->setApiVersion(ConfigurationManagement::api)
->setData($this->data)
->setKeysToExport($this
->getKeysToExport())
->setDependencies(drupal_map_assoc(array_keys($this
->getDependencies())))
->setOptionalConfigurations(drupal_map_assoc(array_keys($this
->getOptionalConfigurations())))
->setModules($modules)
->save();
if ($settings
->getSetting('start_tracking')) {
$this
->buildHash();
$settings
->addInfo('hash', $this
->getHash());
$this
->startTracking();
}
foreach ($modules as $module) {
$settings
->addInfo('modules', $module);
}
// Add the current config as an exported item
$settings
->addInfo('exported', $this
->getUniqueId());
}