You are here

function domain_conf_features_export_render in Domain Access 7.3

Implements hook_features_export_render().

File

domain_conf/domain_conf.features.inc, line 31
Features support for Domain Conf.

Code

function domain_conf_features_export_render($module_name, $data, $export = NULL) {
  domain_features_load($module_name, 'domain_conf_default_variables', FALSE);
  $code = array();
  $code[] = '  $domain_variables = array();';

  // Set the wipe tables item.
  if ($wipe = domain_features_export_wipe_tables_code($data, $code, $export, 'domain_variables') && empty($export)) {

    // Check for changes against the target database.
    $data = domain_machine_names();
  }
  foreach ($data as $name) {
    if ($name != 'wipe-domain-tables') {
      $variables = domain_conf_prepare_export($name);
      $code[] = "  \$domain_variables['{$name}'] = " . features_var_export($variables, '  ') . ";";
    }
  }
  $code[] = "\n  return \$domain_variables;";
  $output = implode("\n", $code);
  return array(
    'domain_conf_default_variables' => $output,
  );
}