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
$defaultValues  : mixed
$entitydata  : mixed
$fieldMapping  : mixed
$headers  : Headers
$id  : mixed
$importedRecordInfo  : mixed
$mergeFields  : mixed
$mergeType  : mixed
$module  : mixed
$type  : mixed
$user  : mixed
$activatedLocale  : bool
$inventoryFieldMapData  : mixed
$csrfInitiated  : bool
__construct()  : mixed
Constructor.
addRelation()  : mixed
Add relation.
checkPermission()  : mixed
{@inheritdoc}
createRecordByModel()  : array<string|int, mixed>|null
Create record.
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.
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.
updateImportStatus()  : mixed
Update import status.
updateModuleSequenceNumber()  : mixed
updateRecordByModel()  : mixed
Update record.
validateRequest()  : void
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 = \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

$activatedLocale

protected static bool $activatedLocale = false

Activated language locale.

$inventoryFieldMapData

protected mixed $inventoryFieldMapData = []

$csrfInitiated

private static bool $csrfInitiated = false

CSRF already initiated.

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

createRecordByModel()

Create record.

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

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

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) : void
Parameters
$request : Request
Return values
void

        

Search results