function domain_features_export_render in Domain Access 7.3
Implements hook_features_export_render().
File
- ./
domain.features.inc, line 31 - Features integration for Domain Access.
Code
function domain_features_export_render($module_name, $data, $export = NULL) {
domain_features_load($module_name, 'domain_default_domains', FALSE);
$code = array();
$code[] = ' $domains = array();';
// Set the wipe tables item.
if ($wipe = domain_features_export_wipe_tables_code($data, $code, $export, 'domains') && empty($export)) {
// Check for changes against the target database.
$data = domain_machine_names();
}
foreach ($data as $name) {
$record = domain_machine_name_load($name);
if (!empty($record)) {
unset($record['domain_id']);
$code[] = " \$domains['" . $record['machine_name'] . "'] = " . features_var_export($record, ' ') . ";";
}
}
$code[] = "\n return \$domains;";
$output = implode("\n", $code);
return array(
'domain_default_domains' => $output,
);
}