|
dolibarr
x.y.z
|
Class to manage exports. More...
Public Member Functions | |
| __construct ($db) | |
| Constructor. More... | |
| load_arrays ($user, $filter='') | |
| Load an exportable dataset. More... | |
| build_sql ($indice, $array_selected, $array_filterValue) | |
| Build the sql export request. More... | |
| build_filterQuery ($TypeField, $NameField, $ValueField) | |
| Build the conditionnal string from filter the query. More... | |
| conditionDate ($Field, $Value, $Sens) | |
| conditionDate More... | |
| build_filterField ($TypeField, $NameField, $ValueField) | |
| Build an input field used to filter the query. More... | |
| genDocFilter ($TypeField) | |
| Build an input field used to filter the query. More... | |
| build_file ($user, $model, $datatoexport, $array_selected, $array_filterValue, $sqlquery='') | |
| Build export file. More... | |
| create ($user) | |
| Save an export model in database. More... | |
| fetch ($id) | |
| Load an export profil from database. More... | |
| delete ($user, $notrigger=0) | |
| Delete object in database. More... | |
| list_export_model () | |
| Output list all export models TODO Move this into a class htmlxxx.class.php. More... | |
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 = '' |
|||
| ) |
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) |
Definition at line 580 of file export.class.php.
| 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 409 of file export.class.php.
| 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 302 of file export.class.php.
References 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 231 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 387 of file export.class.php.
References db.
| Export::create | ( | $user | ) |
Save an export model in database.
| User | $user | Object user that save |
Definition at line 739 of file export.class.php.
| Export::delete | ( | $user, | |
$notrigger = 0 |
|||
| ) |
Delete object in database.
Definition at line 816 of file export.class.php.
| Export::fetch | ( | $id | ) |
Load an export profil from database.
| int | $id | Id of profil to load |
Definition at line 779 of file export.class.php.
| Export::genDocFilter | ( | $TypeField | ) |
Build an input field used to filter the query.
| string | $TypeField | Type of Field to filter |
Definition at line 539 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 853 of file export.class.php.
| 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 86 of file export.class.php.