Export
class Export (View source)
Class to manage exports
Properties
| DoliDB | $db | ||
| int | $id | ||
| string[] | $array_export_icon | ||
| bool[] | $array_export_perms | ||
| string | $error | ||
| string | $errno | ||
| string[] | $errors | ||
| array<int, string> | $array_export_code | ||
| string[] | $array_export_code_for_sort | ||
| DolibarrModules[] | $array_export_module | ||
| string[] | $array_export_label | ||
| string[] | $array_export_sql_start | ||
| string[] | $array_export_sql_end | ||
| string[] | $array_export_sql_order | ||
| array<int, array<string, string>> | $array_export_fields | ||
| array<int, array<string, string>> | $array_export_TypeFields | ||
| array<int, array<string, string>> | $array_export_FilterValue | ||
| array<int, array<string, string>> | $array_export_entities | ||
| array<int, array<string, string>> | $array_export_dependencies | ||
| array<array<array{rule: string, file: string, classfile: string, class: string, method: string, method_params: string[]}>> | $array_export_special | ||
| array<array<string, string>> | $array_export_examplevalues | ||
| array<int, array<string, string>|""> | $array_export_help | ||
| string | $hexa | ||
| string | $hexafiltervalue | ||
| string | $datatoexport | ||
| string | $model_name | ||
| int | $fk_user | ||
| string | $sqlusedforexport |
Methods
Constructor
Load an exportable dataset
Build the sql export request.
Build the conditional string from filter the query
conditionDate
Build an input field used to filter the query
Build an input field used to filter the query
Build export file.
Save an export model in database
Load an export profil from database
Output list all export models --TODO Move this into a class htmlxxx.class.php--
Details
__construct($db)
Constructor
@param DoliDB $db Database handler
load_arrays($user, string $filter = '')
Load an exportable dataset
@param User $user Object user making export
build_sql(int $indice, $array_selected, $array_filterValue)
Build the sql export request.
Arrays this->array_export_xxx are already loaded for required datatoexport
build_filterQuery($TypeField, string $NameField, $ValueField)
Build the conditional string from filter the query
@param string $TypeField Type of Field to filter
conditionDate($Field, string $Value, $Sens)
conditionDate
@param string $Field Field operand 1
build_filterField($TypeField, string $NameField, $ValueField)
Build an input field used to filter the query
@param 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
genDocFilter($TypeField)
Build an input field used to filter the query
@param string $TypeField Type of Field to filter
build_file(User $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
int
create($user)
Save an export model in database
@param User $user Object user that save
int
fetch($id)
Load an export profil from database
@param int $id Id of profil to load
int
delete(User $user, $notrigger = 0)
Delete object in database
void
list_export_model()
Output list all export models --TODO Move this into a class htmlxxx.class.php--