You are here

function hierarchical_select_features_export_render in Hierarchical Select 6.3

Same name and namespace in other branches
  1. 7.3 hierarchical_select.features.inc \hierarchical_select_features_export_render()

Implementation of hook_features_export_render().

File

./hierarchical_select.features.inc, line 59
Integration with the features module.

Code

function hierarchical_select_features_export_render($module, $data) {
  module_load_include('inc', 'hierarchical_select', 'includes/common');
  module_load_include('inc', 'hierarchical_select', 'hierarchical_select.admin');
  $code = array();
  $code[] = '$configs = array();';
  foreach ($data as $config_id) {
    $config = hierarchical_select_common_config_get($config_id);
    $config['config_id'] = $config_id;
    $code[] = _hierarchical_select_create_export_code($config);
    $code[] = "\$configs['{$config_id}'] = \$config;";
  }
  $code[] = "return \$configs;";
  $code = implode("\n", $code);
  return array(
    'hierarchical_select_default_configs' => $code,
  );
}