function ctools_configuration_hash in Configuration Management 7
1 call to ctools_configuration_hash()
File
- includes/
configuration.ctools.inc, line 420
Code
function ctools_configuration_hash($identifier) {
// Export just the field we're tracking.
module_load_include('inc', 'configuration', 'configuration.export');
// PHP 5.2 throws warnings when the 5.3 only constant is passed in.
$backtrace = @debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
$component = substr($backtrace[1]['function'], strlen('configuration_hash_'));
$data = ctools_component_configuration_export_options($component);
// Export the field we just saved and evaluate the export to $export
$code = ctools_component_configuration_export_render($component, 'configuration', array(
$identifier,
));
eval(array_pop($code));
// Page Manager does not use the export variable, we have to set it here.
// @todo: Come up with a cleaner way to do this.
if ($component == 'page_manager_pages') {
$export = $pages;
}
return md5(serialize($export[$identifier]));
}