PriceGlobalVariableUpdater
class PriceGlobalVariableUpdater (View source)
Class for price global variable updaters table
Properties
| DoliDB | $db | ||
| string | $error | ||
| string[] | $errors | ||
| int[] | $types | ||
| int | $update_min | ||
| int | $id | ||
| int | $type | ||
| string | $description | ||
| ?string | $parameters | ||
| int | $fk_variable | ||
| int | $update_interval | ||
| int | $next_update | ||
| ?string | $last_status | ||
| 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
Returns the last updated time in string html format, returns "never" if its less than 1
Checks if all parameters are in order
List all price global variables
List all updaters which need to be processed
Handles the processing of this updater
Update next_update into database
Update last_status into database
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
getLastUpdated()
Returns the last updated time in string html format, returns "never" if its less than 1
@return string
void
checkParameters()
Checks if all parameters are in order
listUpdaters()
List all price global variables
@return PriceGlobalVariableUpdater[]|int<-1,-1> Array of price global variable updaters
listPendingUpdaters()
List all updaters which need to be processed
@return PriceGlobalVariableUpdater[]|int<-1,-1> Array of price global variable updaters
process()
Handles the processing of this updater
@return int Return integer <0 if KO, 0 if OK but no global variable found, >0 if OK
update_next_update($next_update, User $user = null, $notrigger = 0)
Update next_update into database
@param int $next_update Next update to write
update_status($last_status, User|null $user = null, $notrigger = 0)
Update last_status into database
@param string $last_status Status to write