You are here

function key_integration_features_export_render in Key 7

Implements hook_features_export_render().

File

includes/key_integration.features.inc, line 32
Provides Features integration for managing key integrations.

Code

function key_integration_features_export_render($module_name, $data, $export = NULL) {
  $code = array();
  $code[] = '  $integrations = array();';
  $code[] = '';
  foreach ($data as $name) {
    $integration = key_get_integration_settings($name, TRUE);
    $integration_identifier = features_var_export($name);
    $integration_export = features_var_export($integration, '  ');
    $code[] = "  // Exported key integration: {$name}.";
    $code[] = "  \$integrations[{$integration_identifier}] = {$integration_export};";
    $code[] = "";
  }
  $code[] = '  return $integrations;';
  $code = implode("\n", $code);
  return array(
    'key_default_integrations' => $code,
  );
}