You are here

function content_features_export_render in Default Content 7

Same name and namespace in other branches
  1. 7.2 defaultcontent.features.inc \content_features_export_render()

Implements hook_features_export_render().

File

./defaultcontent.features.inc, line 32
Handles all features exporting functionality

Code

function content_features_export_render($module_name, $data, $export = NULL) {
  $code = "  \$content = array();\n";
  asort($data);
  foreach ($data as $name) {
    if ($node = defaultcontent_get_node($name)) {
      $code .= "\n";
      $code .= "  \$content['{$name}'] = " . defaultcontent_export_node($node) . ";\n";
    }
  }
  $code .= "\n";
  $code .= "return \$content;";
  return array(
    'content_defaults' => $code,
  );
}