Documentation

Import_Data_Action extends Action
in package

Abstract action controller class.

Table of Contents

IMPORT_RECORD_CREATED  = 1
IMPORT_RECORD_FAILED  = 5
IMPORT_RECORD_MERGED  = 4
IMPORT_RECORD_NONE  = 0
IMPORT_RECORD_SKIPPED  = 2
IMPORT_RECORD_UPDATED  = 3
$batchImport  : mixed
$csrfActive  : bool
CSRF is active?.
$defaultValues  : mixed
$entitydata  : mixed
$fieldMapping  : mixed
$headers  : Headers
$id  : mixed
$importedRecordInfo  : mixed
$mergeFields  : mixed
$mergeType  : mixed
$module  : mixed
$type  : mixed
$user  : mixed
$activatedCsrf  : bool
Activated csrf.
$activatedLocale  : bool
Activated language locale.
$allPicklistValues  : mixed
$inventoryFieldMapData  : mixed
__construct()  : mixed
Constructor.
addRelation()  : mixed
Add relation.
checkPermission()  : mixed
{@inheritdoc}
createEntityRecord()  : int
Function creates a record of the related module.
createRecordByModel()  : array<string|int, mixed>|null
Create rekord.
finishImport()  : mixed
getDefaultFieldValues()  : array<string|int, mixed>
Get default field values.
getDefaultMandatoryFieldValues()  : array<string|int, mixed>
Get default mandatory field values.
getImportDetails()  : mixed
Function to get Record details of import.
getImportRecordStatus()  : int
Get import record status.
getImportStatusCount()  : int
Get import status count.
getScheduledImport()  : mixed
import()  : mixed
importData()  : mixed
Import data.
importRecords()  : bool
Import records.
initializeImport()  : mixed
isSessionExtend()  : bool
Function to check if session is extended.
loginRequired()  : bool
Function to check login required permission.
postProcess()  : mixed
Post process function.
postProcessAjax()  : mixed
Post process ajax function.
preProcess()  : mixed
Pre process function.
preProcessAjax()  : mixed
Pre process ajax function.
process()  : mixed
Process action.
runScheduledImport()  : mixed
Function run scheduled import and send email.
sendHeaders()  : mixed
Send headers.
transformDate()  : string
Function transforms value for date type field.
transformDatetime()  : string
Function transforms value for datetime type field.
transformForImport()  : array<string|int, mixed>
Function parses data to import.
transformInventoryFieldFromMap()  : false|int|string
Transform inventory field from map.
transformInventoryForImport()  : mixed
Transform inventory for import.
transformInventoryReference()  : mixed
Function transforms value for reference type field.
transformMultipicklist()  : string
Function transforms value for multipicklist type field.
transformOwner()  : int
Function transforms value for owner type field.
transformPicklist()  : string
Function transforms value for picklist type field.
transformReference()  : bool|int
Function transforms value for reference type field.
transformSharedOwner()  : string
Function transforms value for sharedOwner type field.
transformTree()  : string
Function transforms value for tree type field.
updateImportStatus()  : mixed
Update import status.
updateModuleSequenceNumber()  : mixed
updateRecordByModel()  : mixed
Update record.
validateRequest()  : bool
Function to validate request method.

Constants

IMPORT_RECORD_CREATED

public mixed IMPORT_RECORD_CREATED = 1

IMPORT_RECORD_FAILED

public mixed IMPORT_RECORD_FAILED = 5

IMPORT_RECORD_MERGED

public mixed IMPORT_RECORD_MERGED = 4

IMPORT_RECORD_NONE

public mixed IMPORT_RECORD_NONE = 0

IMPORT_RECORD_SKIPPED

public mixed IMPORT_RECORD_SKIPPED = 2

IMPORT_RECORD_UPDATED

public mixed IMPORT_RECORD_UPDATED = 3

Properties

$batchImport

public mixed $batchImport = rue

$csrfActive

CSRF is active?.

public bool $csrfActive = true

$defaultValues

public mixed $defaultValues = []

$entitydata

public mixed $entitydata = []

$fieldMapping

public mixed $fieldMapping

$headers

public Headers $headers

Headers instance.

$importedRecordInfo

public mixed $importedRecordInfo = []

$mergeFields

public mixed $mergeFields

$mergeType

public mixed $mergeType

$module

public mixed $module

$type

public mixed $type

$user

public mixed $user

$activatedCsrf

Activated csrf.

protected static bool $activatedCsrf = false

$activatedLocale

Activated language locale.

protected static bool $activatedLocale = false

$allPicklistValues

protected mixed $allPicklistValues = []

$inventoryFieldMapData

protected mixed $inventoryFieldMapData = []

Methods

__construct()

Constructor.

public __construct(array<string|int, mixed> $importInfo, User $user) : mixed
Parameters
$importInfo : array<string|int, mixed>
$user : User
Return values
mixed

addRelation()

Add relation.

public addRelation(int $relationId, int|null $sourceId, Vtiger_Record_Model $recordModel) : mixed
Parameters
$relationId : int
$sourceId : int|null
$recordModel : Vtiger_Record_Model
Return values
mixed

checkPermission()

{@inheritdoc}

public checkPermission(Request $request) : mixed
Parameters
$request : Request
Return values
mixed

createEntityRecord()

Function creates a record of the related module.

public createEntityRecord(string $moduleName, string $entityLabel) : int
Parameters
$moduleName : string
$entityLabel : string
Return values
int

createRecordByModel()

Create rekord.

public createRecordByModel(string $moduleName, array<string|int, mixed> $fieldData, int|null $relationId, int|null $sourceId) : array<string|int, mixed>|null
Parameters
$moduleName : string
$fieldData : array<string|int, mixed>
$relationId : int|null
$sourceId : int|null
Return values
array<string|int, mixed>|null

finishImport()

public finishImport() : mixed
Return values
mixed

getDefaultFieldValues()

Get default field values.

public getDefaultFieldValues() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDefaultMandatoryFieldValues()

Get default mandatory field values.

public getDefaultMandatoryFieldValues() : array<string|int, mixed>
Return values
array<string|int, mixed>

getImportDetails()

Function to get Record details of import.

public static getImportDetails(User $user, mixed $forModule) : mixed
Parameters
$user : User
$forModule : mixed
Tags
parms

\App\User $user Current Users

parms

string $forModule Imported module

returns

array Import Records with the list of skipped records and failed records

Return values
mixed

getImportRecordStatus()

Get import record status.

public getImportRecordStatus(string $value) : int
Parameters
$value : string
Return values
int

getImportStatusCount()

Get import status count.

public getImportStatusCount() : int
Return values
int

getScheduledImport()

public static getScheduledImport() : mixed
Return values
mixed

import()

public import() : mixed
Return values
mixed

importData()

Import data.

public importData() : mixed
Return values
mixed

importRecords()

Import records.

public importRecords() : bool
Return values
bool

initializeImport()

public initializeImport() : mixed
Return values
mixed

isSessionExtend()

Function to check if session is extended.

public isSessionExtend(Request $request) : bool
Parameters
$request : Request
Return values
bool

loginRequired()

Function to check login required permission.

public loginRequired() : bool
Return values
bool

postProcess()

Post process function.

public postProcess(Request $request[, bool $display = true ]) : mixed
Parameters
$request : Request
$display : bool = true
Return values
mixed

postProcessAjax()

Post process ajax function.

public postProcessAjax(Request $request) : mixed
Parameters
$request : Request
Return values
mixed

preProcess()

Pre process function.

public preProcess(Request $request[, bool $display = true ]) : mixed
Parameters
$request : Request
$display : bool = true
Return values
mixed

preProcessAjax()

Pre process ajax function.

public preProcessAjax(Request $request) : mixed
Parameters
$request : Request
Return values
mixed

process()

Process action.

public process(Request $request) : mixed
Parameters
$request : Request
Return values
mixed

runScheduledImport()

Function run scheduled import and send email.

public static runScheduledImport() : mixed
Return values
mixed

sendHeaders()

Send headers.

public sendHeaders() : mixed
Return values
mixed

transformDate()

Function transforms value for date type field.

public transformDate(string $fieldValue) : string
Parameters
$fieldValue : string
Return values
string

transformDatetime()

Function transforms value for datetime type field.

public transformDatetime(string $fieldValue) : string
Parameters
$fieldValue : string
Return values
string

transformForImport()

Function parses data to import.

public transformForImport(array<string|int, mixed> $fieldData) : array<string|int, mixed>
Parameters
$fieldData : array<string|int, mixed>
Return values
array<string|int, mixed>

transformInventoryFieldFromMap()

Transform inventory field from map.

public transformInventoryFieldFromMap( $value,  $mapData) : false|int|string
Parameters
$value :
$mapData :
Return values
false|int|string

transformInventoryForImport()

Transform inventory for import.

public transformInventoryForImport( $inventoryData) : mixed
Parameters
$inventoryData :
Tags
throws
AppException
Return values
mixed

transformInventoryReference()

Function transforms value for reference type field.

public transformInventoryReference(mixed $value[, mixed $getArray = false ]) : mixed
Parameters
$value : mixed
$getArray : mixed = false
Return values
mixed

transformMultipicklist()

Function transforms value for multipicklist type field.

public transformMultipicklist(Vtiger_Field_Model $fieldInstance, string $fieldValue) : string
Parameters
$fieldInstance : Vtiger_Field_Model
$fieldValue : string
Return values
string

transformOwner()

Function transforms value for owner type field.

public transformOwner(Vtiger_Field_Model $fieldInstance, string $fieldValue) : int
Parameters
$fieldInstance : Vtiger_Field_Model
$fieldValue : string
Return values
int

transformPicklist()

Function transforms value for picklist type field.

public transformPicklist(Vtiger_Field_Model $fieldInstance, string $fieldValue) : string
Parameters
$fieldInstance : Vtiger_Field_Model
$fieldValue : string
Return values
string

transformReference()

Function transforms value for reference type field.

public transformReference(Vtiger_Field_Model $fieldInstance, string $fieldValue) : bool|int
Parameters
$fieldInstance : Vtiger_Field_Model
$fieldValue : string
Return values
bool|int

transformSharedOwner()

Function transforms value for sharedOwner type field.

public transformSharedOwner(Vtiger_Field_Model $fieldInstance, string $fieldValue) : string
Parameters
$fieldInstance : Vtiger_Field_Model
$fieldValue : string
Return values
string

transformTree()

Function transforms value for tree type field.

public transformTree(Vtiger_Field_Model $fieldInstance, string $fieldValue) : string
Parameters
$fieldInstance : Vtiger_Field_Model
$fieldValue : string
Return values
string

updateImportStatus()

Update import status.

public updateImportStatus(int $entryId, array<string|int, mixed> $entityInfo) : mixed
Parameters
$entryId : int
$entityInfo : array<string|int, mixed>
Return values
mixed

updateModuleSequenceNumber()

public updateModuleSequenceNumber() : mixed
Return values
mixed

updateRecordByModel()

Update record.

public updateRecordByModel(int $record, array<string|int, mixed> $fieldData[, string $moduleName = false ], int|null $relationId, int|null $sourceId) : mixed
Parameters
$record : int
$fieldData : array<string|int, mixed>
$moduleName : string = false
$relationId : int|null
$sourceId : int|null
Return values
mixed

validateRequest()

Function to validate request method.

public validateRequest(Request $request) : bool
Parameters
$request : Request
Return values
bool

        

Search results