Import
class Import (View source)
Class to manage imports
Properties
| DoliDB | $db | ||
| string | $error | ||
| string[] | $errors | ||
| string | $errno | ||
| DolibarrModules}> | $array_import_module | ||
| int[] | $array_import_perms | ||
| string[] | $array_import_icon | ||
| string[] | $array_import_code | ||
| string[] | $array_import_label | ||
| string[][] | $array_import_tables | ||
| array<""|array<string, string>> | $array_import_tables_creator | ||
| array<array<string, string>> | $array_import_fields | ||
| $array_import_fieldshidden | |||
| array<""|array<string, string>> | $array_import_entities | ||
| array<""|array<string, string>> | $array_import_regex | ||
| array<""|array<string, string>> | $array_import_updatekeys | ||
| array<""|array<string, string>> | $array_import_preselected_updatekeys | ||
| array<""|array<string, string>> | $array_import_examplevalues | ||
| array<""|array<array{rule: string, file: string, class: string, method: string}>> | $array_import_convertvalue | ||
| array<""|array<string, string>> | $array_import_run_sql_after | ||
| int | $id | ||
| string | $hexa | ||
| string | $datatoimport | ||
| string | $model_name | ||
| int | $fk_user |
Methods
Constructor
Load description int this->array_import_module, this->array_import_fields, ... of an importable dataset
Build an import example file.
Save an import model in database
Load an import profil from database
Details
__construct($db)
Constructor
@param DoliDB $db Database handler
load_arrays($user, string $filter = '')
Load description int this->array_import_module, this->array_import_fields, ... of an importable dataset
@param User $user Object user making import
build_example_file(string $model, $headerlinefields, $contentlinevalues, $datatoimport)
Build an import example file.
Arrays this->array_export_xxx are already loaded for required datatoexport
int
create($user)
Save an import model in database
@param User $user Object user that save
int
fetch($id)
Load an import profil from database
@param int $id Id of profil to load
int
delete(User $user, $notrigger = 0)
Delete object in database