Bitrix API

BlogPost extends Base

Interface CopyImplementer for copy entities.

Table of Contents

Constants

BLOG_POST_COPY_ERROR  = "BLOG_POST_COPY_ERROR"

Methods

__construct()  : mixed
add()  : int|bool
Adds entity.
copyChildren()  : Result
Starts copying children entities.
copyVote()  : int
Copies vote.
getErrors()  : array<string|int, Error>
getFields()  : array<string|int, mixed>
Returns entity fields.
prepareFieldsToCopy()  : array<string|int, mixed>
Preparing data before creating a new BlogPost.
setBlogCommentCopier()  : mixed
To copy comments needs comment copier.
setChangedRights()  : mixed
To overwrite access rights to a post in a new entity, you need to specify the identifier of the new entity.
setExecutiveUserId()  : void
To copy on agent need user id.
setFeatures()  : mixed
Writes features to the copy queue.
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()  : bool
Updates entity.
updateAttachedIdsInText()  : void

Constants

BLOG_POST_COPY_ERROR

public mixed BLOG_POST_COPY_ERROR = "BLOG_POST_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

Added entity id or false.

copyChildren()

Starts copying children entities.

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

BlogPost id.

$copiedEntityId : int

Copied BlogPost id.

Return values
Result

copyVote()

Copies vote.

public copyVote(int $voteId) : int
Parameters
$voteId : int

Vote id.

Return values
int

copied vote id.

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 BlogPost.

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

setBlogCommentCopier()

To copy comments needs comment copier.

public setBlogCommentCopier(EntityCopier $blogCommentCopier) : mixed
Parameters
$blogCommentCopier : EntityCopier

Comment copier.

setChangedRights()

To overwrite access rights to a post in a new entity, you need to specify the identifier of the new entity.

public setChangedRights(array<string|int, mixed> $changedRights) : mixed
Parameters
$changedRights : array<string|int, mixed>

Ration changed id.

setExecutiveUserId()

To copy on agent need user id.

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

setFeatures()

Writes features to the copy queue.

public setFeatures(array<string|int, mixed> $features) : mixed
Parameters
$features : array<string|int, mixed>

List features.

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()

Updates entity.

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

List entity fields.

Return values
bool

updateAttachedIdsInText()

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

        
On this page

Search results