dolibarr  21.0.0-alpha
Public Member Functions | List of all members
Cstate Class Reference

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

Inheritance diagram for Cstate:
Inheritance graph
[legend]
Collaboration diagram for Cstate:
Collaboration graph
[legend]

Public Member Functions

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

Detailed Description

Class to manage dictionary States (used by imports)

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

Constructor & Destructor Documentation

◆ __construct()

Cstate::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 62 of file cstate.class.php.

Member Function Documentation

◆ create()

Cstate::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 75 of file cstate.class.php.

◆ delete()

Cstate::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 242 of file cstate.class.php.

◆ fetch()

Cstate::fetch (   $id,
  $code = '' 
)

Load object in memory from database.

Parameters
int$idState ID
string$codeState code
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 141 of file cstate.class.php.

References $sql.

◆ getNomUrl()

Cstate::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 282 of file cstate.class.php.

◆ update()

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

Update object into database.

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

Definition at line 185 of file cstate.class.php.


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