Drupal Module Development
Duration: 12 hours Training materials: slides, code samples Prerequisites: familiarity with Drupal and its contrib modules from a user perspective, some PHP knowledge, basic MySQL knowledge, a general understanding of Linux-based systems
How Drupal modules work
- What is in a Drupal module
- The Drupal hooks system
- Finding your way in the Drupal API documentation
Basic module implementation
- Creating a
.info
File - The Drupal Schema API
- Creating a basic
.install
file - Describing and documenting your module:
hook_help()
- Exposing blocks:
hook_block()
- Testing your module
Forms and theming
- The Form API: building, validating and processing forms
- Theming your module and forms
- Setting permissions:
hook_perm()
Versioning and updating
- Versioning scheme for Drupal modules
- Writing update functions
- Ensuring a smooth upgrade path
System integration
- Logging events:
hook_watchdog()
- Scheduling operations:
hook_cron()
- Drush integration
Best practices
- Splitting functionality in submodules
- Writing localizable modules: the
t()
function - Writing secure modules
- Contributing your module to drupal.org
Please contact us for more information.