modules/Import/Importer.php

Show: inherited
Table of Contents

\Importer

Package:

Properties

Propertyprotected\$bean  $bean= ''

Details
Type
\$bean
Propertyprotected\Currency  $defaultUserCurrency= ''

Details
Type
\Currency
Propertyprotected\ImportFieldSanitizer  $ifs= ''

Details
Type
\ImportFieldSanitizer
Propertyprotected\importColumns  $importColumns= ''

Details
Type
\importColumns
Propertyprotected\importSource  $importSource= ''

Details
Type
\importSource
Propertyprotected\$isUpdateOnly  $isUpdateOnly= ''

Details
Type
\$isUpdateOnly
Propertyprotected\sugarToExternalSourceFieldMap  $sugarToExternalSourceFieldMap= 'array()'

Default valuearray()Details
Type
\sugarToExternalSourceFieldMap

Methods

methodpublic__construct(  $importSource,  $bean ) : void

Parameters
Name Type Description
$importSource
$bean
methodprotected_convertId( string $string ) : string

clean id's when being imported

Parameters
Name Type Description
$string string
Returns
Type Description
string
methodprotected_undoCreatedBeans( array $ids ) : void

If a bean save is not done for some reason, this method will undo any of the beans that were created

Parameters
Name Type Description
$ids array

ids of user_last_import records created

methodpubliccheckRelatedIDsAfterSave(  $focus ) : void

upon bean save, the relationships are saved by SugarBean->save_relationship_changes() method, but those values depend on the request object and is not reliable during import. This function makes sure any defined related or parent id's are processed and their relationship saved.

Parameters
Name Type Description
$focus
methodprotectedcloneExistingBean(  $focus ) : void

Parameters
Name Type Description
$focus
methodprotectedgetFieldSanitizer( ) : void

methodprotectedgetImportColumns( ) : void

methodpublicgetImportableModules( ) : void
static

methodpublichandleImportErrors( int $errno, string $errstr, string $errfile, string $errline ) : void
static

Replaces PHP error handler in Step4

Parameters
Name Type Description
$errno int
$errstr string
$errfile string
$errline string
methodpublicimport( ) : void

methodprotectedimportRow(  $row ) : void

Parameters
Name Type Description
$row
methodprotectedpopulateDefaultMapValue(  $field,  $fieldValue,  $fieldDef ) : void

Parameters
Name Type Description
$field
$fieldValue
$fieldDef
methodprotectedremoveDeletedBean(  $focus ) : void

Parameters
Name Type Description
$focus
methodpublicretrieveAdvancedMapping( ) : void

methodprotectedsanitizeFieldValueByType(  $rowValue,  $fieldDef,  $defaultRowValue,  $focus,  $fieldTranslated ) : void

Parameters
Name Type Description
$rowValue
$fieldDef
$defaultRowValue
$focus
$fieldTranslated
methodprotectedsaveImportBean(  $focus,  $newRecord ) : void

Parameters
Name Type Description
$focus
$newRecord
methodprotectedsaveMappingFile( ) : void

methodpublicsetFieldKeyTranslator(  $translator ) : void

Sets a translation map from sugar field key to external source key used while importing a row. This allows external sources to return a data set that is an associative array rather than numerically indexed.

Parameters
Name Type Description
$translator
Documentation was generated by DocBlox 0.18.1.