dolibarr  21.0.0-alpha
Public Member Functions | List of all members
DolibarrTriggers Class Reference

Class that all triggers must inherit. More...

Inheritance diagram for DolibarrTriggers:
Inheritance graph
[legend]
Collaboration diagram for DolibarrTriggers:
Collaboration graph
[legend]

Public Member Functions

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

Detailed Description

Class that all triggers must inherit.

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

Constructor & Destructor Documentation

◆ __construct()

DolibarrTriggers::__construct ( DoliDB  $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Reimplemented in InterfaceLogevents.

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

References description, and name.

Member Function Documentation

◆ getDesc()

DolibarrTriggers::getDesc ( )

Returns the description of trigger file.

Returns
string

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

◆ getName()

DolibarrTriggers::getName ( )

Returns the name of the trigger file.

Returns
string

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

◆ getVersion()

DolibarrTriggers::getVersion ( )

Returns the version of the trigger file.

Returns
string Version of trigger file

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

◆ runTrigger()

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

Function called when a Dolibarr 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 if KO: <0 || if no trigger ran: 0 || if OK: >0

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

◆ setErrorsFromObject()

DolibarrTriggers::setErrorsFromObject ( CommonObject  $object)

setErrorsFromObject

Parameters
CommonObject$objectObject
Returns
void

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

References $object.


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