PriceGlobalVariable
class PriceGlobalVariable (View source)
Class for accessing price global variables table
Properties
| DoliDB | $db | ||
| string | $error | ||
| string[] | $errors | ||
| int | $id | ||
| ?string | $code | ||
| string | $description | ||
| int|string|float | $value | ||
| string | $table_element |
Methods
Constructor
Create object into database
Load object in memory from the database
Update object into database
Initialise object with example values Id must be 0 if object instance is a specimen
Checks if all parameters are in order
List all price global variables
Details
__construct($db)
Constructor
@param DoliDB $db Database handler
create($user, int $notrigger = 0)
Create object into database
@param User $user User that creates
int
fetch($id)
Load object in memory from the database
@param int $id Id object
update($user = null, int $notrigger = 0)
Update object into database
@param User|null $user User that modifies
delete($rowid, User $user, $notrigger = 0)
Delete object in database
@param int $rowid Row id of global variable
int
initAsSpecimen()
Initialise object with example values Id must be 0 if object instance is a specimen
void
checkParameters()
Checks if all parameters are in order
listGlobalVariables()
List all price global variables
@return PriceGlobalVariable[]|int<-1,-1> Array of price global variables, <0 if ko