Hooks system: Difference between revisions

Jump to navigation Jump to search
Line 54: Line 54:
Note: You will want to redo this step if you want to add multiple hooks at different places in your script.
Note: You will want to redo this step if you want to add multiple hooks at different places in your script.


Now your module should be hookable, and you can follow the procedure below in '''Usage''' to implement a hooking function that will take advantage of your new hooks.
Now your module should be hookable, and you can follow the procedure below in '''Implement a hook''' to implement a hooking function that will take advantage of your new hooks.
 
Note2: If your hook can't be accessed, try to DISABLE then RENABLE your module for the hooks to be taken in account by Dolibarr (may not be required).


= Implement the Hook =
= Implement the Hook =

Navigation menu