8. Drupal’s Extenisbility
• Drupal’s goal is “infinite extensibility” - this
is what Drupal is generally optimizing for
• The same APIs that define Drupal’s core
functionality are available to you as a
module developer
9. Drupal’s Extenisbility
• Drupal’s goal is “infinite extensibility” - this
is what Drupal is generally optimizing for
• The same APIs that define Drupal’s core
functionality are available to you as a
module developer
• The hook system!
15. Database Abstraction
Layer
• Drupal provides a procedural wrapper to
provide support for multiple types of
databases (essentially MySQL and
PostgreSQL)
16. Database Abstraction
Layer
• Drupal provides a procedural wrapper to
provide support for multiple types of
databases (essentially MySQL and
PostgreSQL)
• A thin (and somewhat outdated) wrapper
around the underlying SQL
17. Database Abstraction
Layer
• Drupal provides a procedural wrapper to
provide support for multiple types of
databases (essentially MySQL and
PostgreSQL)
• A thin (and somewhat outdated) wrapper
around the underlying SQL
• On it’s way out (Drupal 7 introduces a new
db layer based on PDO)
31. The Hook System
• both core and contrib provide a set of
“hooks” that your module can implement
to add functionality to existing operations
32. The Hook System
• both core and contrib provide a set of
“hooks” that your module can implement
to add functionality to existing operations
• your module registers to be notified of a
particular operation by implementing a
hook
33. The Hook System
• sample hook:
• sample implementation:
• called by:
42. Theme Registry
• modules must implement hook_theme to
declare their themable functions and
templates
43. Theme Registry
• modules must implement hook_theme to
declare their themable functions and
templates
• these functions must be titled
theme_function_name
44. Theme Registry
• modules must implement hook_theme to
declare their themable functions and
templates
• these functions must be titled
theme_function_name
• theme(‘function_name’, $param) is then
used to call the function