Help with trigger

Hello to everyone, in first place i want to present myself, i’m Borja from Spain and i’m an active Dolibarr module developer.

Well, mi question is this, i’m having trouble to declare a trigger for my module, i go to the descriptor file “modDoliStocker.php” (in my case) and enable de triggers in the module_parts array.

also i put the trigger file with this name interface_99_all_Mytrigger.class.php and modify the classname to “InterfaceMytrigger” but the Dolibarr not detects it, but if i copy the trigger file to the htdocs/core/triggers/ it recognizes but in my modules folder not.

thanks for all

Hi college module developer,

Just had a peek in my code and on .
Your triggers file path has to look like this: htdocs/dolistocker/core/triggers/interface_99_modDoliStocker_InterfaceMytrigger.php
Make shure your classname is InterfaceMytrigger.
Hope this solves your problem.

Regards,
Francis

1 Like