dolibarr  7.0.0-beta
Public Member Functions | List of all members
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. 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...
 
 runTrigger ($action, $object, User $user, Translate $langs, Conf $conf)
 Function called when a Dolibarrr business event is done. More...
 

Detailed Description

Class that all the triggers must extend.

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

Constructor & Destructor Documentation

DolibarrTriggers::__construct ( DoliDB  $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

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

References name.

Member Function Documentation

DolibarrTriggers::getDesc ( )

Returns the description of trigger file.

Returns
string

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

DolibarrTriggers::getName ( )

Returns the name of the trigger file.

Returns
string

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

DolibarrTriggers::getVersion ( )

Returns the version of the trigger file.

Returns
string Version of trigger file

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

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 <0 if KO, 0 if no triggered ran, >0 if OK

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