dolibarr 19.0.3
|
Class to manage exports. More...
Public Member Functions | |
__construct ($db) | |
Constructor. | |
load_arrays ($user, $filter='') | |
Load an exportable dataset. | |
build_sql ($indice, $array_selected, $array_filterValue) | |
Build the sql export request. | |
build_filterQuery ($TypeField, $NameField, $ValueField) | |
Build the conditionnal string from filter the query. | |
conditionDate ($Field, $Value, $Sens) | |
conditionDate | |
build_filterField ($TypeField, $NameField, $ValueField) | |
Build an input field used to filter the query. | |
genDocFilter ($TypeField) | |
Build an input field used to filter the query. | |
build_file ($user, $model, $datatoexport, $array_selected, $array_filterValue, $sqlquery='', $separator='') | |
Build export file. | |
create ($user) | |
Save an export model in database. | |
fetch ($id) | |
Load an export profil from database. | |
delete ($user, $notrigger=0) | |
Delete object in database. | |
list_export_model () | |
Output list all export models –TODO Move this into a class htmlxxx.class.php–. | |
Class to manage exports.
Definition at line 31 of file export.class.php.
Export::__construct | ( | $db | ) |
Export::build_file | ( | $user, | |
$model, | |||
$datatoexport, | |||
$array_selected, | |||
$array_filterValue, | |||
$sqlquery = '', | |||
$separator = '' ) |
Build export file.
File is built into directory $conf->export->dir_temp.'/'.$user->id Arrays this->array_export_xxx are already loaded for required datatoexport
User | $user | User that export |
string | $model | Export format |
string | $datatoexport | Name of dataset to export |
array | $array_selected | Filter on array of fields to export |
array | $array_filterValue | Filter on array of fields with a filter |
string | $sqlquery | If set, transmit the sql request for select (otherwise, sql request is generated from arrays) |
string | $separator | separator to fill $objmodel->separator with the new separator |
Definition at line 602 of file export.class.php.
References dol_include_once(), dol_mkdir(), dol_now(), dol_print_date(), dol_stringtotime(), dol_syslog(), getDolGlobalString(), and num_open_day().
Export::build_filterField | ( | $TypeField, | |
$NameField, | |||
$ValueField ) |
Build an input field used to filter the query.
string | $TypeField | Type of Field to filter. Example: Text, Date, List:c_country:label:rowid, List:c_stcom:label:code, Numeric or Number, Boolean |
string | $NameField | Name of the field to filter |
string | $ValueField | Initial value of the field to filter |
Definition at line 430 of file export.class.php.
References dol_print_error(), and dol_trunc().
Export::build_filterQuery | ( | $TypeField, | |
$NameField, | |||
$ValueField ) |
Build the conditionnal string from filter the query.
string | $TypeField | Type of Field to filter |
string | $NameField | Name of the field to filter |
string | $ValueField | Value of the field for filter. Must not be '' |
Definition at line 323 of file export.class.php.
References dol_syslog(), and sanitizeVal().
Export::build_sql | ( | $indice, | |
$array_selected, | |||
$array_filterValue ) |
Build the sql export request.
Arrays this->array_export_xxx are already loaded for required datatoexport
int | $indice | Indice of export |
array | $array_selected | Filter fields on array of fields to export |
array | $array_filterValue | Filter records on array of value for fields |
Definition at line 252 of file export.class.php.
Export::conditionDate | ( | $Field, | |
$Value, | |||
$Sens ) |
conditionDate
string | $Field | Field operand 1 |
string | $Value | Value operand 2 |
string | $Sens | Comparison operator |
Definition at line 408 of file export.class.php.
Export::create | ( | $user | ) |
Save an export model in database.
User | $user | Object user that save |
Definition at line 803 of file export.class.php.
References dol_syslog().
Export::delete | ( | $user, | |
$notrigger = 0 ) |
Delete object in database.
Definition at line 880 of file export.class.php.
References dol_syslog().
Export::fetch | ( | $id | ) |
Load an export profil from database.
int | $id | Id of profil to load |
Definition at line 843 of file export.class.php.
References dol_print_error(), and dol_syslog().
Export::genDocFilter | ( | $TypeField | ) |
Build an input field used to filter the query.
string | $TypeField | Type of Field to filter |
Definition at line 560 of file export.class.php.
Export::list_export_model | ( | ) |
Output list all export models –TODO Move this into a class htmlxxx.class.php–.
Definition at line 918 of file export.class.php.
References dol_print_error(), img_delete(), and img_object().
Export::load_arrays | ( | $user, | |
$filter = '' ) |
Load an exportable dataset.
User | $user | Object user making export |
string | $filter | Load a particular dataset only |
Definition at line 107 of file export.class.php.
References dol_osencode(), dol_syslog(), dolGetModulesDirs(), and verifCond().