Module Builder

11 Followers
0 Following
20 Posts

Module Builder is a GUI code generator for Drupal which analyses your codebase in order to generate components dynamically.

Module Builder is a Drupal module, which is powered by the Drupal Code Builder library.

Follow for occasional updates. Operated by @joachim.

Avatar icon from https://iconduck.com.

Project pagehttps://www.drupal.org/project/module_builder
Documentationhttps://drupal-code-builder.github.io/module-builder-docs/
The new release of #Drupal Code Builder, 4.5.7, adds the ability to add a custom class to a generated YAML plugin. For example, you might want a menu link plugin which has special dynamic behaviour. And as with most classes generated by Drupal Code Builder, you can also specify which services to inject.
New release of Module Builder. 4.1.3 adds options to write the module as a test module or a submodule inside an existing module.
New release of Module Builder! Version 4.1.2 adds tables for compound elements with a small number of properties. This kicks in for things such as form elements and plugin type attribute class properties. It makes the form for compound elements simpler to understand. #Drupal
Small bugfix release of one of Module Builder's dependencies, because I incorrectly assumed that tokenized hook names don't have a token just after the 'hook_'. Wrong!!! Hello hook_ENTITY_TYPE_access(), hook_ENTITY_TYPE_create(), and friends! You can generate multiple copies of the same hook with different replacement values for the tokens, such as 'node', 'user' and so on. The legacy hook implementation functions are generated too! #Drupal
Module Builder 4.1.0 shows descriptions and documentation links in custom autocomplete form elements for components such as hooks, plugins, and form elements. #Drupal
Generate code for multiple hooks classes for your module, each with injected services, with Module Builder 4.1.0. Specify values for the tokens in hook names (e.g. 'hook_form_FORM_ID_alter'), and add multiple copies of the same hook. https://www.drupal.org/project/module_builder #Drupal
Module Builder

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 Drupal code works, and seasoned developers who are too lazy to look up what arguments a function has to take.

Drupal.org
Arbitrary hooks classes are coming to Module Builder soon. Currently, all OO hooks are put in a single class, but the next release will allow any number of hooks classes, with injected services for each class. There's also token replacement for dynamic hook names, so you can add multiple copies of hook_form_FORM_ID_alter() and set the FORM_ID for each one. #Drupal #DrupalCodeBuilder