439
edits
(added modulecontext) |
m (→Implementation) |
||
| Line 11: | Line 11: | ||
These steps must be followed for every php script of your module where you want to implement hooks. | These steps must be followed for every php script of your module where you want to implement hooks. | ||
1- Initialize the HookManager object (put this in the beginning of your script, just after includes): | 1- Initialize the HookManager object (put this in the beginning of your script, just after includes): | ||
| Line 22: | Line 23: | ||
''''modulecontext'''' is the module's context as a string. This is simply a indicator that hooking functions can use to detect which modules they want to hook (several different modules can have the same hooks names, but a hooking function may want to hook only one specific module and not the others). | ''''modulecontext'''' is the module's context as a string. This is simply a indicator that hooking functions can use to detect which modules they want to hook (several different modules can have the same hooks names, but a hooking function may want to hook only one specific module and not the others). | ||
2- Place hooks wherever you want in your script: | 2- Place hooks wherever you want in your script: | ||
edits