33require_once DOL_DOCUMENT_ROOT.
'/core/triggers/dolibarrtriggers.class.php';
50 $this->
name = preg_replace(
'/^Interface/i',
'', get_class($this));
51 $this->family =
"demo";
54 $this->version =
'development';
55 $this->picto =
'mymodule@mymodule';
75 return $this->description;
93 if (!isModEnabled(
'mymodule')) {
102 $methodName = lcfirst(str_replace(
' ',
'', ucwords(str_replace(
'_',
' ', strtolower($action)))));
103 $callback = array($this, $methodName);
104 if (is_callable($callback)) {
106 "Trigger '".$this->
name.
"' for action '$action' launched by ".__FILE__.
". id=".$object->id
109 return call_user_func($callback, $action, $object, $user, $langs, $conf);
317 dol_syslog(
"Trigger '".$this->
name.
"' for action '".$action.
"' launched by ".__FILE__.
". id=".$object->id);
Class to stock current configuration.
Class that all the triggers must extend.
Class of triggers for MyModule module.
getDesc()
Trigger description.
runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
Function called when a Dolibarrr business event is done.
__construct($db)
Constructor.
Class to manage translations.
Class to manage Dolibarr users.
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
$conf db name
Only used if Module[ID]Name translation string is not found.