-
Notifications
You must be signed in to change notification settings - Fork 35
icms_db_legacy_updater_Handler
Raimondas Rimkevičius edited this page Mar 9, 2020
·
1 revision
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!
icms_db_legacy_updater_Handler class
Class performing the database update for the module
- Class name: icms_db_legacy_updater_Handler
- Namespace:
public \icms_db_Connection $_db
- Visibility: public
public \icms_db_Connection $db
- Visibility: public
public array $_messages = array()
- Visibility: public
mixed icms_db_legacy_updater_Handler::__construct()
- Visibility: public
bool icms_db_legacy_updater_Handler::runQuery(string query, string goodmsg, string badmsg, bool force)
Use to execute a general query
- Visibility: public
- query string - <p>query that will be executed</p>
- goodmsg string - <p>message displayed on success</p>
- badmsg string - <p>message displayed on error</p>
- force bool - <p>force the query even in a GET process</p>
bool icms_db_legacy_updater_Handler::renameTable(string from, string to, bool force)
Use to rename a table
- Visibility: public
- from string - <p>name of the table to rename</p>
- to string - <p>new name of the renamed table</p>
- force bool - <p>force the query even in a GET process</p>
bool icms_db_legacy_updater_Handler::uninstallObjectItem(string dirname, string item, array reservedTables)
Remove table or some rows if table is used for other object
- Visibility: public
- dirname string
- item string
- reservedTables array
mixed icms_db_legacy_updater_Handler::insertConfig(int conf_catid, string conf_name, string conf_title, mixed conf_value, string conf_desc, string conf_formtype, string conf_valuetype, int conf_order)
Insert a config in System Preferences
- Visibility: public
- conf_catid int
- conf_name string
- conf_title string
- conf_value mixed
- conf_desc string
- conf_formtype string
- conf_valuetype string
- conf_order int
mixed icms_db_legacy_updater_Handler::moduleUpgrade(mixed module, mixed tables_first)
- Visibility: public
- module mixed
- tables_first mixed
mixed icms_db_legacy_updater_Handler::automaticUpgrade(string dirname, mixed item)
Upgrade automaticaly an item of a module
Note that currently, $item needs to represent the name of an object derived from SmartObject, for example, $item == 'invoice' wich will represent $dirnameInvoice for example SmartbillingInvoice which extends SmartObject class
- Visibility: public
- dirname string - <p>dirname of the module</p>
- item mixed - <p>name or array of names of the item to upgrade</p>
mixed icms_db_legacy_updater_Handler::upgradeObjectItem(string dirname, mixed item)
Upgrades the object
- Visibility: public
- dirname string
- item mixed
string icms_db_legacy_updater_Handler::getFieldTypeFromVar(array var)
Get the type of the field based on the info of the var
- Visibility: public
- var array - <p>array containing information about the var</p>
string icms_db_legacy_updater_Handler::getFieldDefaultFromVar(array var, bool key)
Get the default value based on the info of the var
- Visibility: public
- var array - <p>array containing information about the var</p>
- key bool - <p>TRUE if the var is the primary key</p>
bool icms_db_legacy_updater_Handler::updateTable(\icms_db_legacy_updater_Table table, bool force)
Use to update a table
- Visibility: public
- table icms_db_legacy_updater_Table - <p>Table that will be updated</p>
- force bool - <p>force the query even in a GET process</p>
bool icms_db_legacy_updater_Handler::updateModuleDBVersion(int newDBVersion, string dirname)
Update the DBVersion of a module
- Visibility: public
- newDBVersion int - <p>new database version</p>
- dirname string - <p>dirname of the module</p>