dolibarr 21.0.0-beta
Interfaces Class Reference

Class to manage triggers. More...

Public Member Functions

 __construct ($db)
 Constructor.
 
 run_triggers ($action, $object, $user, $langs, $conf)
 Function called when a Dolibarr business event occurs This function call all qualified triggers.
 
 getTriggersList ($forcedirtriggers=null)
 Return list of triggers.
 

Detailed Description

Class to manage triggers.

Definition at line 33 of file interfaces.class.php.

Constructor & Destructor Documentation

◆ __construct()

Interfaces::__construct ( $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 60 of file interfaces.class.php.

Member Function Documentation

◆ getTriggersList()

Interfaces::getTriggersList ( $forcedirtriggers = null)

Return list of triggers.

Function used by admin page htdoc/admin/triggers. List is sorted by trigger filename so by priority to run.

Parameters
?array<int,string>$forcedirtriggers null=All default directories. This parameter is used by modulebuilder module only.
Returns
array<array{picto:string,file:string,fullpath:string,relpath:string,iscoreorexternal?:'internal'|'external',version?:string,status?:string,module?:string,info:string}> Array list of triggers

Definition at line 259 of file interfaces.class.php.

References $conf, dol_buildpath(), dol_osencode(), img_object(), and img_picto().

◆ run_triggers()

Interfaces::run_triggers ( $action,
$object,
$user,
$langs,
$conf )

Function called when a Dolibarr business event occurs This function call all qualified triggers.

Parameters
string$actionTrigger event code
Object$objectObject concerned. Some context information may also be provided into array property object->context.
User$userObject user
Translate$langsObject lang
Conf$confObject conf
Returns
int Nb of triggers ran if no error, -Nb of triggers with errors otherwise.

Definition at line 77 of file interfaces.class.php.

References $conf, $object, dol_buildpath(), dol_osencode(), dol_syslog(), and getDolGlobalInt().


The documentation for this class was generated from the following file: