Send the link below via email or IMCopy
Present to your audienceStart remote presentation
- Invited audience members will follow you as you navigate and present
- People invited to a presentation do not need a Prezi account
- This link expires 10 minutes after you close the presentation
- A maximum of 30 users can follow your presentation
- Learn more about this feature in our knowledge base article
Do you really want to delete this prezi?
Neither you, nor the coeditors you shared it with will be able to recover it again.
Make your likes visible on Facebook?
You can change this under Settings & Account at any time.
Introduction to Rapid Module Development in Drupal 7
Transcript of Introduction to Rapid Module Development in Drupal 7
Where do I start?
What IS a module?
The bare necessities
What's a hook?
A brief overview of the framework
A module is a collection of hooks
and API calls that act together to
extend or modify core functionality.
Modules are the building blocks that give Drupal its flexibility and power
localize and/or abstract text - t()
generate site and alias aware links - l()
load, modify and save nodes - node_load(), node_save()
allow theme layer to appropriately display content - theme()
display theme aware notices or error messages to user - drupal_set_message()
render a Form API array*
An example module workflow
a hypothetical login acknowledgement module
name = "Example module"
description = "Simple example."
core = 7.x
version = 7.x-1.0
package = Views
dependencies = views
dependencies = panels
Available core hooks
Add or modify users - user_load()/user_save()
check for permissions - user_access()
I'm building the "user_login" form. Anyone want to take a look?
Add these form elements and my callback
get and save simple settings - variable_get()/variable_set()
Drupal is fond of large nested
arrays and objects
hooks & API calls
The module development process
Make sure you really need a module
Make sure someone else didn't already do it
Research the hooks you will need
Research the API calls available
See if a module can provide some of the work for you
Create your module