Tuesday, January 25, 2011

Module System - Hooks

Drupal module system based on hook. Hook is a function that name hook_lol(), for example. The hook, in the example, lies in lol module. So anyone who want to implement the hook must do this - me_lol(), if my module is me.
In real life, see menu module and help module in module directory. Try to open menu.module file. There you will see a function menu_help($path, $arg). Then open help.api.php file in module/help directory, and you will see hook_help($path, $arg) function

No comments:

Post a Comment