public static function ConfigurationManagement::updateTrackingFile in Configuration Management 7.2
This function save into config://tracked.inc file the configurations that are currently tracked.
1 call to ConfigurationManagement::updateTrackingFile()
- ConfigurationManagement::exportToDataStore in lib/
Drupal/ configuration/ Config/ ConfigurationManagement.php - Export the configuration from the ActiveStore to the DataStore.
File
- lib/
Drupal/ configuration/ Config/ ConfigurationManagement.php, line 574 - Definition of Drupal\configuration\Config\ConfigurationManagement.
Class
Namespace
Drupal\configuration\ConfigCode
public static function updateTrackingFile($modules = array()) {
$tracked = static::trackedConfigurations();
$file = array();
foreach ($tracked as $component => $list) {
foreach ($list as $identifier => $info) {
$file[$component . '.' . $identifier] = $info['hash'];
}
}
$file_content = "<?php\n\n";
$file_content .= "// This file contains the current being tracked configurations.\n\n";
$file_content .= '$tracked = ' . var_export($file, TRUE) . ";\n";
$file_content .= "\n\n// The following modules are required to run the configurations of this file.\n\n";
$file_content .= "\$modules = array(\n";
foreach (array_unique($modules) as $module) {
$file_content .= " '{$module}',\n";
}
$file_content .= ");\n";
if (Storage::checkFilePermissions('tracked.inc')) {
file_put_contents(static::getStream() . '/tracked.inc', $file_content);
}
}