Cstate
class Cstate extends CommonDict (View source)
Class to manage dictionary States (used by imports)
Properties
| DoliDB | $db | from CommonDict | |
| $error | from CommonDict | ||
| string[] | $errors | from CommonDict | |
| int | $id | from CommonDict | |
| ?int | $entity | from CommonDict | |
| ?string | $code | from CommonDict | |
| ?string | $label | from CommonDict | |
| ?int<0, 1> | $active | from CommonDict | |
| string deprecated | $code_departement | ||
| ?string | $name | ||
| $nom |
Methods
__construct($db)
Constructor
create($user, int $notrigger = 0)
Create object into database
fetch($id, string $code = '')
Load object in memory from database
update($user = null, int $notrigger = 0)
Update object into database
string
getNomUrl(int $withpicto = 0, string $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
Return a link to the object card (with optionally the picto)
Details
__construct($db)
Constructor
@param DoliDB $db Database handler
create($user, int $notrigger = 0)
Create object into database
@param User $user User that create
fetch($id, string $code = '')
Load object in memory from database
@param int $id State ID
update($user = null, int $notrigger = 0)
Update object into database
@param User $user User who updates
delete(User $user, $notrigger = 0)
Delete object in database
string
getNomUrl(int $withpicto = 0, string $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
Return a link to the object card (with optionally the picto)