dolibarr 19.0.4
DolibarrTriggers Class Reference

Class that all the triggers must extend. More...

Inheritance diagram for DolibarrTriggers:
Collaboration diagram for DolibarrTriggers:

Public Member Functions

 __construct (DoliDB $db)
 Constructor.
 
 getName ()
 Returns the name of the trigger file.
 
 getDesc ()
 Returns the description of trigger file.
 
 getVersion ()
 Returns the version of the trigger file.
 
 setErrorsFromObject ($object)
 setErrorsFromObject
 
 runTrigger ($action, $object, User $user, Translate $langs, Conf $conf)
 Function called when a Dolibarrr business event is done.
 

Detailed Description

Class that all the triggers must extend.

Definition at line 21 of file dolibarrtriggers.class.php.

Constructor & Destructor Documentation

◆ __construct()

DolibarrTriggers::__construct ( DoliDB $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Reimplemented in InterfaceLogevents.

Definition at line 93 of file dolibarrtriggers.class.php.

References name.

Member Function Documentation

◆ getDesc()

DolibarrTriggers::getDesc ( )

Returns the description of trigger file.

Returns
string

Reimplemented in InterfaceMyModuleTriggers, and InterfaceWebhookTriggers.

Definition at line 117 of file dolibarrtriggers.class.php.

◆ getName()

DolibarrTriggers::getName ( )

Returns the name of the trigger file.

Returns
string

Reimplemented in InterfaceMyModuleTriggers, and InterfaceWebhookTriggers.

Definition at line 107 of file dolibarrtriggers.class.php.

◆ getVersion()

DolibarrTriggers::getVersion ( )

Returns the version of the trigger file.

Returns
string Version of trigger file

Definition at line 127 of file dolibarrtriggers.class.php.

◆ runTrigger()

DolibarrTriggers::runTrigger ( $action,
$object,
User $user,
Translate $langs,
Conf $conf )
abstract

Function called when a Dolibarrr business event is done.

All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared)

Parameters
string$actionEvent action code
Object$objectObject
User$userObject user
Translate$langsObject langs
conf$confObject conf
Returns
int Return integer <0 if KO, 0 if no triggered ran, >0 if OK

Reimplemented in InterfaceActionsAuto, InterfaceActionsBlockedLog, InterfaceContactRoles, InterfaceEventOrganization, InterfaceLdapsynchro, InterfaceLogevents, InterfaceMailmanSpipsynchro, InterfaceMyModuleTriggers, InterfaceNotification, InterfaceStripe, InterfaceTicketEmail, InterfaceWebhookTriggers, and InterfaceZapierTriggers.

◆ setErrorsFromObject()

DolibarrTriggers::setErrorsFromObject ( $object)

setErrorsFromObject

Parameters
CommonObject$objectcommonobject
Returns
void

Definition at line 151 of file dolibarrtriggers.class.php.


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