dolibarr 21.0.0-beta
Events Class Reference

Events class. More...

Public Member Functions

 __construct ($db)
 Constructor.
 
 create ($user)
 Create in database.
 
 update ($user=null, $notrigger=0)
 Update database.
 
 fetch ($id, $user=null)
 Load object in memory from database.
 
 delete ($user)
 Delete object in database.
 
 initAsSpecimen ()
 Initialise an instance with random values.
 

Detailed Description

Events class.

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

Constructor & Destructor Documentation

◆ __construct()

Events::__construct ( $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 145 of file events.class.php.

Member Function Documentation

◆ create()

Events::create ( $user)

Create in database.

Parameters
User$userUser that create
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 157 of file events.class.php.

References $conf, description, dol_syslog(), dol_trunc(), getUserRemoteIP(), and type.

◆ delete()

Events::delete ( $user)

Delete object in database.

Parameters
User$userUser that delete
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 294 of file events.class.php.

References dol_syslog().

◆ fetch()

Events::fetch ( $id,
$user = null )

Load object in memory from database.

Parameters
int$idId object
User$userUser that load
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 247 of file events.class.php.

References description, dol_syslog(), and type.

◆ initAsSpecimen()

Events::initAsSpecimen ( )

Initialise an instance with random values.

Used to build previews or test instances. id must be 0 if object instance is a specimen.

Returns
int

Definition at line 317 of file events.class.php.

References description, and type.

◆ update()

Events::update ( $user = null,
$notrigger = 0 )

Update database.

Parameters
User$userUser that modify
int$notrigger0=no, 1=yes (no update trigger)
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 213 of file events.class.php.

References description, dol_syslog(), and type.


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