You are here

function features_export_render_defaults in Features 7

Same name and namespace in other branches
  1. 6 features.export.inc \features_export_render_defaults()
  2. 7.2 features.export.inc \features_export_render_defaults()

Return a code string representing an implementation of a defaults module hook.

1 call to features_export_render_defaults()
features_export_render in ./features.export.inc
Render feature export into an array representing its files.

File

./features.export.inc, line 376

Code

function features_export_render_defaults($module, $hook, $code, $args = '') {
  $output = array();
  $output[] = "/**";
  $output[] = " * Implements hook_{$hook}().";
  $output[] = " */";
  $output[] = "function {$module}_{$hook}(" . $args . ") {";
  $output[] = $code;
  $output[] = "}";
  return implode("\n", $output);
}