You are here

function configuration_export_render_hooks in Configuration Management 7

Generate an array of hooks and their raw code.

1 call to configuration_export_render_hooks()
configuration_export_render in ./configuration.export.inc
Render feature export into an array representing its files.

File

./configuration.export.inc, line 149

Code

function configuration_export_render_hooks($export, $module_name, $reset = FALSE) {
  configuration_include();
  $code = array();
  $export['reset'] = $reset;

  // Sort components to keep exported code consistent
  ksort($export['configuration']);
  foreach ($export['configuration'] as $component => $data) {
    if (!empty($data)) {

      // Sort the items so that we don't generate different exports based on order
      asort($data);
      if (configuration_hook($component, 'configuration_export_render')) {
        $hooks = configuration_invoke($component, 'configuration_export_render', $module_name, $data, $export);
        $code[$component] = $hooks;
      }
    }
  }
  return $code;
}