dolibarr 21.0.0-alpha
Ccountry Class Reference

Class to manage dictionary Countries (used by imports) More...

Inheritance diagram for Ccountry:
Collaboration diagram for Ccountry:

Public Member Functions

 __construct ($db)
 Constructor.
 
 create ($user, $notrigger=0)
 Create object into database.
 
 fetch ($id, $code='', $code_iso='')
 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)
 

Public Attributes

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

Detailed Description

Class to manage dictionary Countries (used by imports)

Definition at line 31 of file ccountry.class.php.

Constructor & Destructor Documentation

◆ __construct()

Ccountry::__construct ( $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 48 of file ccountry.class.php.

Member Function Documentation

◆ create()

Ccountry::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 61 of file ccountry.class.php.

References dol_syslog(), and rowid.

◆ delete()

Ccountry::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 244 of file ccountry.class.php.

References dol_syslog().

◆ fetch()

Ccountry::fetch ( $id,
$code = '',
$code_iso = '' )

Load object in memory from database.

Parameters
int$idId object
string$codeCode
string$code_isoCode ISO
Returns
int >0 if OK, 0 if not found, <0 if KO

Definition at line 133 of file ccountry.class.php.

References dol_syslog().

◆ getNomUrl()

Ccountry::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 284 of file ccountry.class.php.

◆ update()

Ccountry::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 183 of file ccountry.class.php.

References dol_syslog().


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