ImportHelper
Table of Contents
Constants
- ERR_ACCESS_DENIED_COMPANY_UPDATE = 19
- ERR_ACCESS_DENIED_CONTACT_UPDATE = 20
- ERR_ADDRESS_TYPE_ALREADY_EXISTS = 11
- ERR_ADDRESS_TYPE_IS_NOT_SET = 10
- ERR_BD_KEY_FIELDS_NOT_PRESENT = 12
- ERR_BD_NAME_IS_NOT_SET = 14
- ERR_COMPANY_NOT_EXISTS = 17
- ERR_CONTACT_NOT_EXISTS = 18
- ERR_CREATE_BANK_DETAIL = 28
- ERR_CREATE_REQUISITE = 26
- ERR_DEF_IMP_PRESET_NOT_DEFINED = 21
- ERR_EMPTY_BD_KEY_FIELDS = 13
- ERR_EMPTY_KEY_FIELDS = 2
- ERR_EMPTY_RQ_KEY_FIELDS = 3
- ERR_IMP_PRESET_HAS_NO_ADDR_FIELD = 24
- ERR_IMP_PRESET_NOT_EXISTS = 23
- ERR_INVALID_ENTITY_ID = 16
- ERR_INVALID_ENTITY_TYPE = 15
- ERR_INVALID_IMP_PRESET_ID = 22
- ERR_NEXT_ENTITY = 4
- ERR_NO_ADDRESSES_TO_IMPORT = 25
- ERR_PRESET_ASSOC = 8
- ERR_ROW_LIMIT = 5
- ERR_RQ_KEY_FIELDS_NOT_PRESENT = 6
- ERR_RQ_NAME_IS_NOT_SET = 7
- ERR_UNDEFINED = 1
- ERR_UNKNOWN_ADDRESS_TYPE = 9
- ERR_UPDATE_BANK_DETAIL = 29
- ERR_UPDATE_REQUISITE = 27
Methods
- __construct() : mixed
- enableSearchNextEntityMode() : mixed
- getCurrentEntityKey() : mixed
- getErrorCode() : mixed
- getErrorMessage() : mixed
- getFirstRow() : mixed
- getParsedRequisiteDupParams() : mixed
- getParsedRequisites() : mixed
- getRequisiteDemoData() : mixed
- getRequisiteDupControlImportOptions() : mixed
- getRowCount() : mixed
- getRows() : mixed
- importOldRequisiteAddresses() : Result
- Imports old addresses for the company or contact to requisites. Replaces deprecated method EntityRequisite::importEntityRequisite.
- importParsedRequisites() : Result
- Imports requisites for the company or contact.
- isReady() : mixed
- parseRequisiteData() : mixed
- parseRow() : mixed
- prepareEntityImportRequisiteInfo() : array<string|int, mixed>
- Preparing the headers of requisites to be imported and list of active countries.
- setReady() : mixed
Constants
ERR_ACCESS_DENIED_COMPANY_UPDATE
public
mixed
ERR_ACCESS_DENIED_COMPANY_UPDATE
= 19
ERR_ACCESS_DENIED_CONTACT_UPDATE
public
mixed
ERR_ACCESS_DENIED_CONTACT_UPDATE
= 20
ERR_ADDRESS_TYPE_ALREADY_EXISTS
public
mixed
ERR_ADDRESS_TYPE_ALREADY_EXISTS
= 11
ERR_ADDRESS_TYPE_IS_NOT_SET
public
mixed
ERR_ADDRESS_TYPE_IS_NOT_SET
= 10
ERR_BD_KEY_FIELDS_NOT_PRESENT
public
mixed
ERR_BD_KEY_FIELDS_NOT_PRESENT
= 12
ERR_BD_NAME_IS_NOT_SET
public
mixed
ERR_BD_NAME_IS_NOT_SET
= 14
ERR_COMPANY_NOT_EXISTS
public
mixed
ERR_COMPANY_NOT_EXISTS
= 17
ERR_CONTACT_NOT_EXISTS
public
mixed
ERR_CONTACT_NOT_EXISTS
= 18
ERR_CREATE_BANK_DETAIL
public
mixed
ERR_CREATE_BANK_DETAIL
= 28
ERR_CREATE_REQUISITE
public
mixed
ERR_CREATE_REQUISITE
= 26
ERR_DEF_IMP_PRESET_NOT_DEFINED
public
mixed
ERR_DEF_IMP_PRESET_NOT_DEFINED
= 21
ERR_EMPTY_BD_KEY_FIELDS
public
mixed
ERR_EMPTY_BD_KEY_FIELDS
= 13
ERR_EMPTY_KEY_FIELDS
public
mixed
ERR_EMPTY_KEY_FIELDS
= 2
ERR_EMPTY_RQ_KEY_FIELDS
public
mixed
ERR_EMPTY_RQ_KEY_FIELDS
= 3
ERR_IMP_PRESET_HAS_NO_ADDR_FIELD
public
mixed
ERR_IMP_PRESET_HAS_NO_ADDR_FIELD
= 24
ERR_IMP_PRESET_NOT_EXISTS
public
mixed
ERR_IMP_PRESET_NOT_EXISTS
= 23
ERR_INVALID_ENTITY_ID
public
mixed
ERR_INVALID_ENTITY_ID
= 16
ERR_INVALID_ENTITY_TYPE
public
mixed
ERR_INVALID_ENTITY_TYPE
= 15
ERR_INVALID_IMP_PRESET_ID
public
mixed
ERR_INVALID_IMP_PRESET_ID
= 22
ERR_NEXT_ENTITY
public
mixed
ERR_NEXT_ENTITY
= 4
ERR_NO_ADDRESSES_TO_IMPORT
public
mixed
ERR_NO_ADDRESSES_TO_IMPORT
= 25
ERR_PRESET_ASSOC
public
mixed
ERR_PRESET_ASSOC
= 8
ERR_ROW_LIMIT
public
mixed
ERR_ROW_LIMIT
= 5
ERR_RQ_KEY_FIELDS_NOT_PRESENT
public
mixed
ERR_RQ_KEY_FIELDS_NOT_PRESENT
= 6
ERR_RQ_NAME_IS_NOT_SET
public
mixed
ERR_RQ_NAME_IS_NOT_SET
= 7
ERR_UNDEFINED
public
mixed
ERR_UNDEFINED
= 1
ERR_UNKNOWN_ADDRESS_TYPE
public
mixed
ERR_UNKNOWN_ADDRESS_TYPE
= 9
ERR_UPDATE_BANK_DETAIL
public
mixed
ERR_UPDATE_BANK_DETAIL
= 29
ERR_UPDATE_REQUISITE
public
mixed
ERR_UPDATE_REQUISITE
= 27
Methods
__construct()
public
__construct(mixed $entityTypeId, mixed $headerIndex, mixed $headerInfo, mixed $options) : mixed
Parameters
- $entityTypeId : mixed
- $headerIndex : mixed
- $headerInfo : mixed
- $options : mixed
enableSearchNextEntityMode()
public
enableSearchNextEntityMode(mixed $prevEntityKeyValue) : mixed
Parameters
- $prevEntityKeyValue : mixed
getCurrentEntityKey()
public
getCurrentEntityKey() : mixed
getErrorCode()
public
getErrorCode(Result $result) : mixed
Parameters
- $result : Result
getErrorMessage()
public
getErrorMessage(Result $result) : mixed
Parameters
- $result : Result
getFirstRow()
public
getFirstRow() : mixed
getParsedRequisiteDupParams()
public
getParsedRequisiteDupParams(mixed $requisiteDupControlFieldMap) : mixed
Parameters
- $requisiteDupControlFieldMap : mixed
getParsedRequisites()
public
getParsedRequisites() : mixed
getRequisiteDemoData()
public
static getRequisiteDemoData(mixed $entityTypeId, mixed $exportHeaders, mixed $presetId) : mixed
Parameters
- $entityTypeId : mixed
- $exportHeaders : mixed
- $presetId : mixed
getRequisiteDupControlImportOptions()
public
static getRequisiteDupControlImportOptions(mixed $headers, mixed $activeCountryList[, mixed $optionPrefix = 'IMPORT_DUP_CONTROL_ENABLE_RQ' ]) : mixed
Parameters
- $headers : mixed
- $activeCountryList : mixed
- $optionPrefix : mixed = 'IMPORT_DUP_CONTROL_ENABLE_RQ'
getRowCount()
public
getRowCount() : mixed
getRows()
public
getRows() : mixed
importOldRequisiteAddresses()
Imports old addresses for the company or contact to requisites. Replaces deprecated method EntityRequisite::importEntityRequisite.
public
static importOldRequisiteAddresses(int $entityTypeId, int $entityId, string $dupControlType[, int $presetId = 0 ], array<string|int, mixed> $fields) : Result
Parameters
- $entityTypeId : int
-
Entity type ID.
- $entityId : int
-
Entity ID for import
- $dupControlType : string
-
Duplicate control type ("NO_CONTROL", "REPLACE", "MERGE", "SKIP")
- $presetId : int = 0
-
Preset ID for import
- $fields : array<string|int, mixed>
-
Fields of the requisite to import
Return values
ResultimportParsedRequisites()
Imports requisites for the company or contact.
public
importParsedRequisites(int $entityTypeId, int $entityId, string $dupControlType) : Result
Parameters
- $entityTypeId : int
-
Entity type ID.
- $entityId : int
-
Entity ID for import
- $dupControlType : string
-
Duplicate control type ("NO_CONTROL", "REPLACE", "MERGE", "SKIP")
Return values
ResultisReady()
public
isReady() : mixed
parseRequisiteData()
public
parseRequisiteData() : mixed
parseRow()
public
parseRow(mixed $row) : mixed
Parameters
- $row : mixed
prepareEntityImportRequisiteInfo()
Preparing the headers of requisites to be imported and list of active countries.
public
static prepareEntityImportRequisiteInfo(int $entityTypeId[, array<string|int, mixed> $options = array() ]) : array<string|int, mixed>
Parameters
- $entityTypeId : int
-
Entity type ID.
- $options : array<string|int, mixed> = array()
-
Options, such as prefix and others.
Return values
array<string|int, mixed> —Array with headers for import the requisites
setReady()
public
setReady(mixed $ready) : mixed
Parameters
- $ready : mixed