dolibarr  9.0.0
Public Member Functions | List of all members
Import Class Reference

Class to manage imports. More...

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 load_arrays ($user, $filter='')
 Load description int this->array_import_module, this->array_import_fields, ... More...
 
 build_example_file ($model, $headerlinefields, $contentlinevalues, $datatoimport)
 Build an import example file. More...
 
 create ($user)
 Save an export model in database. More...
 
 fetch ($id)
 Load an import profil from database. More...
 
 delete ($user, $notrigger=0)
 Delete object in database. More...
 

Detailed Description

Class to manage imports.

Definition at line 28 of file import.class.php.

Constructor & Destructor Documentation

◆ __construct()

Import::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 62 of file import.class.php.

Member Function Documentation

◆ build_example_file()

Import::build_example_file (   $model,
  $headerlinefields,
  $contentlinevalues,
  $datatoimport 
)

Build an import example file.

Arrays this->array_export_xxx are already loaded for required datatoexport

Parameters
string$modelName of import engine ('csv', ...)
string$headerlinefieldsArray of values for first line of example file
string$contentlinevaluesArray of values for content line of example file
string$datatoimportDataset to import
Returns
string <0 if KO, >0 if OK

Definition at line 199 of file import.class.php.

◆ create()

Import::create (   $user)

Save an export model in database.

Parameters
User$userObject user that save
Returns
int <0 if KO, >0 if OK

Definition at line 239 of file import.class.php.

◆ delete()

Import::delete (   $user,
  $notrigger = 0 
)

Delete object in database.

Parameters
User$userUser that delete
int$notrigger0=launch triggers after, 1=disable triggers
Returns
int <0 if KO, >0 if OK

Definition at line 319 of file import.class.php.

◆ fetch()

Import::fetch (   $id)

Load an import profil from database.

Parameters
int$idId of profil to load
Returns
int <0 if KO, >0 if OK

Definition at line 279 of file import.class.php.

◆ load_arrays()

Import::load_arrays (   $user,
  $filter = '' 
)

Load description int this->array_import_module, this->array_import_fields, ...

of an importable dataset

Parameters
User$userObject user making import
string$filterLoad a particular dataset only. Index will start to 0.
Returns
int <0 if KO, >0 if OK

Definition at line 76 of file import.class.php.


The documentation for this class was generated from the following file: