You are here

function encrypt_config_features_export_render in Encrypt 7.3

Same name and namespace in other branches
  1. 7.2 includes/encrypt.features.inc \encrypt_config_features_export_render()

Implements hook_features_export_render().

File

includes/encrypt.features.inc, line 32
Provides Features integration for managing configurations.

Code

function encrypt_config_features_export_render($module_name, $data, $export = NULL) {
  $code = array();
  $code[] = '  $configs = array();';
  $code[] = '';
  foreach ($data as $name) {
    $config = encrypt_config_load($name);
    $config_identifier = features_var_export($name);
    $config_export = features_var_export($config, '  ');
    $code[] = "  // Exported configuration: {$name}.";
    $code[] = "  \$configs[{$config_identifier}] = {$config_export};";
    $code[] = "";
  }
  $code[] = '  return $configs;';
  $code = implode("\n", $code);
  return array(
    'encrypt_default_configs' => $code,
  );
}