You are here

function generate_info in Module Builder 5

1 call to generate_info()
module_builder_page_module in ./module_builder.module
Module form: 'module' step. Generate the module code.

File

./module_builder.module, line 915
Builds scaffolding for custom modules.

Code

function generate_info($form_values) {
  $info = MODULE_BUILDER_INFO_ID_COMMENT . "\n";
  $info .= 'name = ';
  if (!empty($form_values['module_readable_name'])) {
    $info .= $form_values['module_readable_name'];
  }
  else {
    $info .= $form_values['module_root_name'];
  }
  $info .= "\n";
  $info .= 'description = ' . $form_values['module_short_description'] . "\n";
  if (!empty($form_values['module_dependencies'])) {
    $info .= 'dependencies = ' . $form_values['module_dependencies'] . "\n";
  }
  if (!empty($form_values['module_package'])) {
    $info .= 'package = ' . $form_values['module_package'] . "\n";
  }
  return $info;
}