A module which auto-generates a skeleton or "scaffolding" for a module, along with hints on how to fill them in. Useful for newbie developers to learn how hooks work, and seasoned developers who are too lazy to look up what arguments a function has to take. ;)
Usage
This module has two different ways of being used, as a Drupal module with an admin UI, and as a Drush plugin. These use the same core API to generate module code. However, most active development of advanced features is taking place on the Drush side of things.
Drupal UI
Install this module as normal and download/process hook data on the settings page. Use the version appropriate for your version of Drupal.
Drush plugin
Install the entire module folder in a place where Drush can find plugins (see Drush documentation for details). It can then be used for any Drupal site that Drush can be used with, independent of Drupal version. Use 7.x-2.x-dev version as a Drush plugin, and use Drush 4.x; see the documentation for more details.
A few examples of what you can do with drush and this module:
drush mb my_module menu cron form_alterGenerate module code with hook_menu, hook_cron, hook_form_alter.
drush mb my_module menu cron --write --name="My module" --dep="forum views"Generate both module and info files, write files to sites/all/modules and also output to terminal.
The Drush plugin uses an interactive mode by default to request any parameters not initially given. To disable this and use default values for anything omitted, specify the --noi option either on the command line or in drushrc.php.
Versions
- Drush: Use 7.x-2.x-dev as a Drush plugin (you can still use 6.x-2.x-dev too, but it's only getting bugfixes). Just like Drush itself, the Module builder Drush plugin is independent of Drupal version, and can generate code for Drupal 5, 6, or 7, depending on the version of the site Drush finds.
- Drupal 7: 7.x-2.x-dev version is being actively developed.
- Drupal 6: 6.x-2.x-dev version is receiving bugfixes only. (6.x-1.x-dev branch has been mothballed. If you installed this, you need to uninstall it before installing 6.x-2.x.)
- Drupal 5: 5.x-1.x-dev version is stable and no longer supported.
Co-maintainers needed: http://drupal.org/node/278908
Invitation for roadmap ideas: http://drupal.org/node/310691
Stability
Module builder is in perpetual development. The development release should never be broken (at least, that's the intention), but there will occasionally be sudden changes in how everything works that will render obsolete your downloaded hook data and any customizations you may have such as custom hook groups and templates.
Downloads
Project Information
- Maintenance status: Actively maintained
- Development status: Under active development
- Module categories: Developer, Drush
- Reported installs: 694 sites currently report using this module. View usage statistics.
- Last modified: November 20, 2011