dolibarr 20.0.0
Cregion Class Reference

Class to manage dictionary Regions. More...

Inheritance diagram for Cregion:
Collaboration diagram for Cregion:

Public Member Functions

 __construct ($db)
 Constructor.
 
 create ($user, $notrigger=0)
 Create object into database.
 
 fetch ($id, $code_region=0, $fk_pays=0)
 Load object in memory from database.
 
 update ($user=null, $notrigger=0)
 Update object into database.
 
 delete ($user, $notrigger=0)
 Delete object in database.
 
 getNomUrl ($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
 Return a link to the object card (with optionally the picto)
 

Detailed Description

Class to manage dictionary Regions.

Definition at line 33 of file cregion.class.php.

Constructor & Destructor Documentation

◆ __construct()

Cregion::__construct ( $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 66 of file cregion.class.php.

Member Function Documentation

◆ create()

Cregion::create ( $user,
$notrigger = 0 )

Create object into database.

Parameters
User$userUser that create
int$notrigger0=launch triggers after, 1=disable triggers
Returns
int Return integer <0 if KO, Id of created object if OK

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

References dol_syslog(), and name.

◆ delete()

Cregion::delete ( $user,
$notrigger = 0 )

Delete object in database.

Parameters
User$userUser that delete
int$notrigger0=launch triggers after, 1=disable triggers
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 275 of file cregion.class.php.

References dol_syslog().

◆ fetch()

Cregion::fetch ( $id,
$code_region = 0,
$fk_pays = 0 )

Load object in memory from database.

Parameters
int$idId object
int$code_regionCode
int$fk_paysCountry Id
Returns
int >0 if OK, 0 if not found, <0 if KO

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

References dol_syslog(), and name.

◆ getNomUrl()

Cregion::getNomUrl ( $withpicto = 0,
$option = '',
$notooltip = 0,
$morecss = '',
$save_lastsearch_value = -1 )

Return a link to the object card (with optionally the picto)

Parameters
int$withpictoInclude picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
string$optionOn what the link point to ('nolink', ...)
int$notooltip1=Disable tooltip
string$morecssAdd more css on link
int$save_lastsearch_value-1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
Returns
string String with URL

Definition at line 316 of file cregion.class.php.

References name.

◆ update()

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

Update object into database.

Parameters
User$userUser that modify
int$notrigger0=launch triggers after, 1=disable triggers
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 209 of file cregion.class.php.

References dol_syslog(), and name.


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