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

Events class. More...

Public Member Functions

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

Public Attributes

 $element ='events'
 Id that identify managed objects.
 
 $table_element ='events'
 Name of table without prefix where object is stored.
 

Detailed Description

Events class.

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

Constructor & Destructor Documentation

Events::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

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

Member Function Documentation

Events::create (   $user)

Create in database.

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

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

References $resql, description, dol_syslog(), dol_trunc(), and type.

Events::delete (   $user)

Delete object in database.

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

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

References $resql, and dol_syslog().

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

Load object in memory from database.

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

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

References $resql, description, dol_syslog(), and type.

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
void

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

References description, and type.

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

Update database.

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

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

References $resql, description, dol_syslog(), and type.


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