- Accessibility
- Actions
- Blog
- Bootstrap
- Calendar
- Code Snippets
- Core Hacks
- Cron
- Development Environment
- Drupal 7
- Flash
- Forms
- Goodies
- Hooks
- Hosting
- Images
- Installation, Updating and Moving
- Internationalization
- Javascript/JQuery
- Learning Drupal (New Users)
- Login/User Management/Permissions
- Logs
- Menus
- Modules
- Nodes
- Paths
- Performance
- RSS
- Reference Sites
- Registry
- Reporting
- Reporting Bugs/Issues
- SEO
- Schema
- Search
- Security
- SimpleTest
- Sites
- Support
- Testing
- Themes
- Troubleshooting
- Upgrading
- User Groups
- Workflow
Submitted by captaindav on Fri, 2009-05-15 09:23
Rather than introduce the complexity of Object Oriented Programming, Drupal utilizes its "Hooks" system to achieve a similar result. Hooks are specially named PHP functions having a defined set of parameters and a specified result type.
Using the hook naming convention, a hook function named foo_bar() indicates that a module named "foo" implemented a hook named "bar". When referring to a specific hook, the string "hook" is used as a placeholder for the module name. For example, for a module file called example.module implemeting hook_help, the hook would be named example_help().