function module_builder_build_data in Module Builder 7
Same name and namespace in other branches
- 6.2 drush/module_builder.drush.inc \module_builder_build_data()
Helper function to build the array of module_data.
1 call to module_builder_build_data()
- module_builder_callback_build in drush/
module_builder.drush.inc - Module builder drush command callback.
File
- drush/
module_builder.drush.inc, line 231 - Module builder drush commands.
Code
function module_builder_build_data($commands) {
// The first argument is the module machine name.
$module_data['module_root_name'] = array_shift($commands);
// Heap of defaults. Later find some nice way of asking for these.
//$data['module_readable_name'] = ucfirst($data['module_root_name']);
//$data['module_short_description'] = 'Description';
// todo: some function in common.inc to set defaults?
$module_data['module_readable_name'] = drush_get_option('name');
$module_data['module_short_description'] = drush_get_option('desc');
$module_data['module_help_text'] = drush_get_option('help');
$module_data['module_dependencies'] = drush_get_option('dep');
$module_data['module_package'] = drush_get_option('package');
return $module_data;
}