You are here

function features_export_render_defaults in Features 6

Same name and namespace in other branches
  1. 7.2 features.export.inc \features_export_render_defaults()
  2. 7 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 356

Code

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