Bitrix API

Comment extends CopyImplementer

Interface CopyImplementer for copy entities.

Table of Contents

Constants

COMMENT_COPY_ERROR  = "COMMENT_COPY_ERROR"

Methods

__construct()  : mixed
add()  : int
Adds entity.
copyChildren()  : Result
Starts copying children entities.
getErrors()  : array<string|int, Error>
getFields()  : array<string|int, mixed>
Returns entity fields.
prepareFieldsToCopy()  : array<string|int, mixed>
Preparing data before creating a new entity.
setExecutiveUserId()  : void
To copy on agent need user id.
setUfIgnoreList()  : void
To avoid copying specific fields, specify a list of fields to ignore.
setUserFieldManager()  : mixed
To copy uf fields, you must pass the uf field manager.
update()  : mixed
updateAttachedIdsInText()  : void
Updates identifiers who's added to text.

Constants

COMMENT_COPY_ERROR

public mixed COMMENT_COPY_ERROR = "COMMENT_COPY_ERROR"

Methods

add()

Adds entity.

public add(Container $container, array<string|int, mixed> $fields) : int
Parameters
$container : Container
$fields : array<string|int, mixed>
Return values
int

message id.

copyChildren()

Starts copying children entities.

public copyChildren(Container $container, int $entityId, int $copiedEntityId) : Result
Parameters
$container : Container
$entityId : int

Entity id.

$copiedEntityId : int

Copied entity id.

Return values
Result

getErrors()

public getErrors() : array<string|int, Error>
Return values
array<string|int, Error>

getFields()

Returns entity fields.

public getFields(Container $container, int $entityId) : array<string|int, mixed>
Parameters
$container : Container
$entityId : int
Return values
array<string|int, mixed>

$fields

prepareFieldsToCopy()

Preparing data before creating a new entity.

public prepareFieldsToCopy(Container $container, array<string|int, mixed> $fields) : array<string|int, mixed>
Parameters
$container : Container
$fields : array<string|int, mixed>

List entity fields.

Return values
array<string|int, mixed>

$fields

setExecutiveUserId()

To copy on agent need user id.

public setExecutiveUserId(int $executiveUserId) : void
Parameters
$executiveUserId : int

setUfIgnoreList()

To avoid copying specific fields, specify a list of fields to ignore.

public setUfIgnoreList(array<string|int, mixed> $ufIgnoreList) : void
Parameters
$ufIgnoreList : array<string|int, mixed>

Ignore list.

setUserFieldManager()

To copy uf fields, you must pass the uf field manager.

public setUserFieldManager(CUserTypeManager $userTypeManager) : mixed
Parameters
$userTypeManager : CUserTypeManager

Uf fields.

update()

public update(mixed $commentId, array<string|int, mixed> $fields) : mixed
Parameters
$commentId : mixed
$fields : array<string|int, mixed>

updateAttachedIdsInText()

Updates identifiers who's added to text.

public updateAttachedIdsInText(int $id, array<string|int, mixed> $attachedIds, callable $auxiliaryCallback) : void
Parameters
$id : int

Id of the entity whose text will be updated.

$attachedIds : array<string|int, mixed>
$auxiliaryCallback : callable

        
On this page

Search results