clean triggers

This commit is contained in:
Frédéric FRANCE 2020-10-26 18:49:38 +01:00
parent 360ea91be5
commit 9c51d467b5
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1

View File

@ -40,11 +40,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php';
*/ */
class InterfaceMyModuleTriggers extends DolibarrTriggers class InterfaceMyModuleTriggers extends DolibarrTriggers
{ {
/**
* @var DoliDB Database handler
*/
protected $db;
/** /**
* Constructor * Constructor
* *
@ -106,7 +101,7 @@ class InterfaceMyModuleTriggers extends DolibarrTriggers
// For example : COMPANY_CREATE => public function companyCreate($action, $object, User $user, Translate $langs, Conf $conf) // For example : COMPANY_CREATE => public function companyCreate($action, $object, User $user, Translate $langs, Conf $conf)
$methodName = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', strtolower($action))))); $methodName = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', strtolower($action)))));
$callback = array($this, $methodName); $callback = array($this, $methodName);
if (is_callable($callback)){ if (is_callable($callback)) {
dol_syslog( dol_syslog(
"Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id "Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id
); );