Bitrix API

EntityConverter

Table of Contents

Methods

convert()  : void
create()  : self
createFromExternalized()  : self|null
enableBizProcCheck()  : mixed
Enable/disable checking for parametrized business process.
enableUserFieldCheck()  : mixed
Enable/disable User Field check.
executePhase()  : bool
Try to execute current conversion phase.
externalize()  : array<string|int, mixed>
Externalize converter settings
fillDestinationItemWithDataFromSourceItem()  : void
getConfig()  : EntityConversionConfig
Get converter configuration
getContextData()  : array<string|int, mixed>
Get converter context data.
getCurrentPhase()  : int
Get current converter phase.
getDestinationEntityID()  : mixed
getEntityConfig()  : EntityConversionConfigItem|null
Get conversion configuration by entity type ID.
getEntityID()  : int
Get source entity ID
getEntityTypeID()  : int
Get source entity type ID
getPermittedDealCategoryIDs()  : array<string|int, mixed>
Get deal category IDs are allowed to use in converter
getResultData()  : array<string|int, mixed>
Get converter result data.
getSupportedDestinationTypeIDs()  : array<string|int, mixed>
Get Supported Destination Types
getUserID()  : int
Get current user ID.
initialize()  : mixed
internalize()  : void
Internalize converter settings.
isBizProcCheckEnabled()  : bool
Check if checking for parametrized business process is enabled.
isFinished()  : bool
Check if current phase is final.
isNewDestinationEntity()  : mixed
isUserFieldCheckEnabled()  : bool
Check if User Field check is enabled.
log()  : void
mapEntityFields()  : array<string|int, mixed>
Map entity fields to specified type.
moveToNextPhase()  : mixed
setContextData()  : void
Set converter context data.
setDestinationEntityID()  : mixed
setEntityID()  : void
Set source entity ID.
setSkipBizProcAutoStart()  : mixed
Enable/disable auto start BP after update
shouldSkipBizProcAutoStart()  : bool
Check should auto start BP after update.
undo()  : void
Remove recently created entities that were created by converter.

Methods

createFromExternalized()

public static createFromExternalized(array<string|int, mixed> $externalizedParams) : self|null
Parameters
$externalizedParams : array<string|int, mixed>
Return values
self|null

enableBizProcCheck()

Enable/disable checking for parametrized business process.

public enableBizProcCheck(bool $enable) : mixed

Checking is performed before a creation operation.

Parameters
$enable : bool

Flag of enabling User Field checking.

enableUserFieldCheck()

Enable/disable User Field check.

public enableUserFieldCheck(bool $enable) : mixed

User Field checking is performed during a creation and update operation.

Parameters
$enable : bool

Flag of enabling User Field checking.

executePhase()

Try to execute current conversion phase.

public executePhase() : bool
Return values
bool

externalize()

Externalize converter settings

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

fillDestinationItemWithDataFromSourceItem()

public fillDestinationItemWithDataFromSourceItem(Item $destinationItem[, array<string|int, mixed> $sourceCollectionFieldNames = [] ]) : void
Parameters
$destinationItem : Item
$sourceCollectionFieldNames : array<string|int, mixed> = []

getContextData()

Get converter context data.

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

getCurrentPhase()

Get current converter phase.

public getCurrentPhase() : int
Return values
int

getDestinationEntityID()

public static getDestinationEntityID(mixed $entityTypeName, array<string|int, mixed> $data) : mixed
Parameters
$entityTypeName : mixed
$data : array<string|int, mixed>

getEntityID()

Get source entity ID

public getEntityID() : int
Return values
int

getEntityTypeID()

Get source entity type ID

public getEntityTypeID() : int
Return values
int

getPermittedDealCategoryIDs()

Get deal category IDs are allowed to use in converter

public static getPermittedDealCategoryIDs([CCrmPerms|null $permissions = null ]) : array<string|int, mixed>
Parameters
$permissions : CCrmPerms|null = null
Return values
array<string|int, mixed>

getResultData()

Get converter result data.

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

getSupportedDestinationTypeIDs()

Get Supported Destination Types

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

getUserID()

Get current user ID.

public getUserID() : int
Return values
int

internalize()

Internalize converter settings.

public internalize(array<string|int, mixed> $params) : void
Parameters
$params : array<string|int, mixed>

Income parameters.

isBizProcCheckEnabled()

Check if checking for parametrized business process is enabled.

public isBizProcCheckEnabled() : bool

Checking is performed before a creation operation. It is enabled by default.

Return values
bool

isFinished()

Check if current phase is final.

public isFinished() : bool
Return values
bool

isNewDestinationEntity()

public static isNewDestinationEntity(mixed $entityTypeName, mixed $entityID, array<string|int, mixed> $data) : mixed
Parameters
$entityTypeName : mixed
$entityID : mixed
$data : array<string|int, mixed>

isUserFieldCheckEnabled()

Check if User Field check is enabled.

public isUserFieldCheckEnabled() : bool

User Field checking is performed during a creation and update operation. It is enabled by default.

Return values
bool

log()

public log(string $message[, array<string|int, mixed> $context = [] ][, string $level = PsrLogLogLevel::INFO ]) : void
Parameters
$message : string
$context : array<string|int, mixed> = []
$level : string = PsrLogLogLevel::INFO

mapEntityFields()

Map entity fields to specified type.

public mapEntityFields(int $entityTypeID[, array<string|int, mixed>|null $options = null ]) : array<string|int, mixed>
Parameters
$entityTypeID : int

Entity type ID.

$options : array<string|int, mixed>|null = null

Mapping options.

Return values
array<string|int, mixed>

moveToNextPhase()

public moveToNextPhase() : mixed
Tags
todo

make so it simply returns false after complete refactoring

setContextData()

Set converter context data.

public setContextData(array<string|int, mixed> $contextData) : void
Parameters
$contextData : array<string|int, mixed>

Converter context data.

setDestinationEntityID()

public static setDestinationEntityID(mixed $entityTypeName, mixed $entityID, array<string|int, mixed> &$data[, array<string|int, mixed> $options = null ]) : mixed
Parameters
$entityTypeName : mixed
$entityID : mixed
$data : array<string|int, mixed>
$options : array<string|int, mixed> = null

setEntityID()

Set source entity ID.

public setEntityID(int $entityID) : void
Parameters
$entityID : int

setSkipBizProcAutoStart()

Enable/disable auto start BP after update

public setSkipBizProcAutoStart(bool $enable) : mixed
Parameters
$enable : bool

Flag of enabling User Field checking.

shouldSkipBizProcAutoStart()

Check should auto start BP after update.

public shouldSkipBizProcAutoStart() : bool
Return values
bool

undo()

Remove recently created entities that were created by converter.

public undo() : void

        
On this page

Search results