dolibarr  7.0.0-beta
Public Member Functions | List of all members
Interfaces Class Reference

Class to manage triggers. More...

Public Member Functions

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

Detailed Description

Class to manage triggers.

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

Constructor & Destructor Documentation

Interfaces::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

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

Member Function Documentation

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$forcedirtriggersnull=All default directories. This parameter is used by modulebuilder module only.
Returns
array Array list of triggers

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

References dol_buildpath(), dol_osencode(), img_object(), img_picto(), and print.

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$objectObjet concerned. Some context information may also be provided into array property object->context.
User$userObjet user
Lang$langsObjet lang
Conf$confObjet conf
Returns
int Nb of triggers ran if no error, -Nb of triggers with errors otherwise.

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

References dol_buildpath(), dol_osencode(), and dol_syslog().


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