You are here

function popupformat_features_export_render in Popup 8

Same name and namespace in other branches
  1. 7 modules/popup_ui/includes/popup_ui.features.inc \popupformat_features_export_render()
  2. 7.x modules/popup_ui/includes/popup_ui.features.inc \popupformat_features_export_render()
  3. 6.x modules/popup_ui/includes/popup_ui.features.inc \popupformat_features_export_render()

Implementation of [component]_features_export_render()

File

modules/popup_ui/includes/popup_ui.features.inc, line 69

Code

function popupformat_features_export_render($module_name, $data, $export = NULL) {
  module_load_include('inc', 'popup_ui', 'includes/popup_ui.admin');
  $formats = _popup_ui_formatter_settings();
  $code[] = '  return array(';
  foreach ($data as $format) {
    $format_export = features_var_export($formats[$format], '    ');
    $format_identifier = features_var_export($format);
    $code[] = "    {$format_identifier} => {$format_export},";
  }
  $code[] = '  );';
  $code = implode("\n", $code);
  return array(
    'popupformat_defaults' => $code,
  );
}