function _patterns_export_merge_exported_patterns in Patterns 7
Same name and namespace in other branches
- 7.2 patterns_export/finalize.inc \_patterns_export_merge_exported_patterns()
Merges modules info and sections in one pattern
Parameters
array $sections The sections of the pattern:
array $info The info section of the pattern:
array $modules The modules section of the pattern:
Return value
array $pattern The merged pattern
2 calls to _patterns_export_merge_exported_patterns()
- patterns_export_to_db in patterns_export/
finalize.inc - Exports a pattern by importing it into the database
- patterns_export_to_file in patterns_export/
finalize.inc - Exports a pattern as a donwlodable text file
File
- patterns_export/
finalize.inc, line 143
Code
function _patterns_export_merge_exported_patterns($sections, $info, $modules) {
$pattern = patterns_api_add_info_section($info);
// Modules that needs to be enabled to run the pattern
patterns_api_add_modules_section($modules, $pattern);
foreach ($sections as $s => $values) {
$pattern[$s] = $values;
}
// Display the exported pattern
//drupal_set_message(print_r($pattern, true));
return $pattern;
}