31,026
edits
| Line 6: | Line 6: | ||
So, to add your own code that will be triggered by a Dolibarr trigger, this is the way to process: | So, to add your own code that will be triggered by a Dolibarr trigger, this is the way to process: | ||
1) (only for Dolibarr >= v3.2.0) in your module descriptor file (eg: '''/mymodule/core/modules/modMyModule.class.php'''), add triggers->1 into module_parts array: | 1) (only for Dolibarr >= v3.2.0) in your module descriptor file (eg: '''/mymodule/core/modules/modMyModule.class.php'''), add triggers->1 into module_parts array: | ||
| Line 17: | Line 18: | ||
</source> | </source> | ||
Then disable and reenable your module. This will add a record into table llx_const to say Dolibarr a trigger file must be searched into module directory '''/mymodule/core/triggers/''' | Then disable and reenable your module. This will add a record into table llx_const to say Dolibarr a trigger file must be searched into module directory '''/mymodule/core/triggers/''' | ||
2) Copy the trigger file '''htdocs/includes/triggers/interface_all_Demo.class.php''' under the new name: | 2) Copy the trigger file '''htdocs/includes/triggers/interface_all_Demo.class.php''' under the new name: | ||