dolibarr 19.0.4
CGenericDic Class Reference

Class CGenericDic. More...

Inheritance diagram for CGenericDic:
Collaboration diagram for CGenericDic:

Public Member Functions

 __construct (DoliDB $db)
 Constructor.
 
 create (User $user, $notrigger=false)
 Create object into database.
 
 fetch ($id, $code='', $label='')
 Load object in memory from the database.
 
 fetchAll ($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter=array(), $filtermode='AND')
 Load object in memory from the database.
 
 update (User $user, $notrigger=false)
 Update object into database.
 
 delete (User $user, $notrigger=false)
 Delete object in database.
 
 createFromClone (User $user, $fromid)
 Load an object from its id and create a new one in database.
 
 initAsSpecimen ()
 Initialise object with example values Id must be 0 if object instance is a specimen.
 

Detailed Description

Class CGenericDic.

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

Constructor & Destructor Documentation

◆ __construct()

CGenericDic::__construct ( DoliDB $db)

Constructor.

Parameters
DoliDb$dbDatabase handler

Definition at line 64 of file cgenericdic.class.php.

Member Function Documentation

◆ create()

CGenericDic::create ( User $user,
$notrigger = false )

Create object into database.

Parameters
User$userUser that creates
bool$notriggerfalse=launch triggers after, true=disable triggers
Returns
int Return integer <0 if KO, Id of created object if OK

Definition at line 79 of file cgenericdic.class.php.

References dol_syslog().

◆ createFromClone()

CGenericDic::createFromClone ( User $user,
$fromid )

Load an object from its id and create a new one in database.

Parameters
User$userUser making the clone
int$fromidId of object to clone
Returns
int New id of clone

Definition at line 431 of file cgenericdic.class.php.

References dol_syslog().

◆ delete()

CGenericDic::delete ( User $user,
$notrigger = false )

Delete object in database.

Parameters
User$userUser that deletes
bool$notriggerfalse=launch triggers after, true=disable triggers
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 378 of file cgenericdic.class.php.

References dol_syslog().

◆ fetch()

CGenericDic::fetch ( $id,
$code = '',
$label = '' )

Load object in memory from the database.

Parameters
int$idId object
string$codecode
string$labelLabel
Returns
int Return integer <0 if KO, 0 if not found, >0 if OK

Definition at line 159 of file cgenericdic.class.php.

References dol_syslog().

◆ fetchAll()

CGenericDic::fetchAll ( $sortorder = '',
$sortfield = '',
$limit = 0,
$offset = 0,
array $filter = array(),
$filtermode = 'AND' )

Load object in memory from the database.

Parameters
string$sortorderSort Order
string$sortfieldSort field
int$limitoffset limit
int$offsetoffset limit
array$filterfilter array
string$filtermodefilter mode (AND or OR)
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 232 of file cgenericdic.class.php.

References dol_syslog().

◆ initAsSpecimen()

CGenericDic::initAsSpecimen ( )

Initialise object with example values Id must be 0 if object instance is a specimen.

Returns
void

Definition at line 479 of file cgenericdic.class.php.

◆ update()

CGenericDic::update ( User $user,
$notrigger = false )

Update object into database.

Parameters
User$userUser that modifies
bool$notriggerfalse=launch triggers after, true=disable triggers
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 302 of file cgenericdic.class.php.

References dol_syslog().


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