class Ctypent extends CommonDict (View source)

Class of dictionary type of thirdparty (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
int $country_id
string $libelle
string $module

Methods

__construct($db)

Constructor

create($user, int $notrigger = 0)

Create object into database

fetch($id, string $code = '', $label = '')

Load object in memory from database

update($user = null, int $notrigger = 0)

Update object into database

delete(User $user, $notrigger = 0)

Delete object in database

Details

__construct($db)

Constructor

@param DoliDB $db Database handler

Parameters

$db

create($user, int $notrigger = 0)

Create object into database

@param User $user User that create

Parameters

$user
int $notrigger

0=launch triggers after, 1=disable triggers @return int Return integer <0 if KO, Id of created object if OK

fetch($id, string $code = '', $label = '')

Load object in memory from database

@param int $id Id object

Parameters

$id
string $code

Code @param string $label Label @return int Return integer <0 if KO, >0 if OK

$label

update($user = null, int $notrigger = 0)

Update object into database

@param User $user User that modify

Parameters

$user
int $notrigger

0=launch triggers after, 1=disable triggers @return int Return integer <0 if KO, >0 if OK

delete(User $user, $notrigger = 0)

Delete object in database

Parameters

User $user

User that delete @param int $notrigger 0=launch triggers after, 1=disable triggers @return int Return integer <0 if KO, >0 if OK

$notrigger