Bitrix API

Section extends CopyImplementer

Interface CopyImplementer for copy entities.

Table of Contents

Constants

SECTION_COPY_ERROR  = "SECTION_COPY_ERROR"

Methods

__construct()  : mixed
add()  : int|bool
Adds entity.
copyChildren()  : Result
Starts copying children entities.
getErrors()  : array<string|int, Error>
getFields()  : array<string|int, mixed>
Returns section fields.
prepareFieldsToCopy()  : array<string|int, mixed>
Preparing data before creating a new entity.
setChangedFields()  : mixed
setChangedFieldsForChildSections()  : mixed
setChild()  : mixed
Writes child implementer to the copy queue.
setExecutiveUserId()  : void
To copy on agent need user id.
setSectionCopier()  : void
To copy child sections needs section copier.
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.

Constants

SECTION_COPY_ERROR

public mixed SECTION_COPY_ERROR = "SECTION_COPY_ERROR"

Methods

add()

Adds entity.

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

return entity id or false.

copyChildren()

Starts copying children entities.

public copyChildren(Container $container, int $sectionId, int $copiedSectionId) : Result
Parameters
$container : Container
$sectionId : int

Section id.

$copiedSectionId : int

Copied section id.

Tags
throws
ArgumentNullException
throws
ArgumentOutOfRangeException
Return values
Result

getErrors()

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

getFields()

Returns section 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

setChangedFields()

public setChangedFields(mixed $changedFields) : mixed
Parameters
$changedFields : mixed

setChangedFieldsForChildSections()

public setChangedFieldsForChildSections(mixed $changedFieldsForChildSections) : mixed
Parameters
$changedFieldsForChildSections : mixed

setChild()

Writes child implementer to the copy queue.

public setChild(Child $child) : mixed
Parameters
$child : Child

Child implementer.

setExecutiveUserId()

To copy on agent need user id.

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

setSectionCopier()

To copy child sections needs section copier.

public setSectionCopier(Section $sectionCopier) : void
Parameters
$sectionCopier : Section

Section copier.

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.


        
On this page

Search results