Bitrix API

CommentPoster uses ExpiredCommentTrait, ExpiredSoonCommentTrait

Class CommentPoster

Table of Contents

Methods

addComments()  : void
Pushes new comments to collection.
appendChecklistChangesMessage()  : void
Appends a message about checklist changes.
clearComments()  : void
Clears comment collection.
disableDeferredPostMode()  : void
Disables deferred post mode.
enableDeferredPostMode()  : void
Enables deferred post mode.
getCommentByType()  : Comment|null
Returns first comment of given type from collection or null if there is no comments of such type.
getCommentText()  : string
Builds comment text by parts data.
getDeferredPostMode()  : bool
Returns current post mode state.
getInstance()  : CommentPoster|null
Returns existing class instance or creates new.
postComments()  : void
Posts comments from collection.
postCommentsOnTaskAdd()  : void
Builds and posts comments on task add if deferred post mode is off.
postCommentsOnTaskExpired()  : void
Builds and posts comments on task expired if deferred post mode is off.
postCommentsOnTaskExpiredSoon()  : void
Builds and posts comments on task expired soon if deferred post mode is off.
postCommentsOnTaskStatusPinged()  : void
postCommentsOnTaskUpdate()  : void
Builds and posts comments on task update if deferred post mode is off.

Methods

addComments()

Pushes new comments to collection.

public addComments(array<string|int, mixed> $comments) : void
Parameters
$comments : array<string|int, mixed>

appendChecklistChangesMessage()

Appends a message about checklist changes.

public appendChecklistChangesMessage() : void

clearComments()

Clears comment collection.

public clearComments() : void

disableDeferredPostMode()

Disables deferred post mode.

public disableDeferredPostMode() : void

enableDeferredPostMode()

Enables deferred post mode.

public enableDeferredPostMode() : void

getCommentByType()

Returns first comment of given type from collection or null if there is no comments of such type.

public getCommentByType([int $type = Comment::TYPE_DEFAULT ]) : Comment|null
Parameters
$type : int = Comment::TYPE_DEFAULT
Return values
Comment|null

getCommentText()

Builds comment text by parts data.

public static getCommentText(array<string|int, mixed> $partsData[, array<string|int, mixed> $params = [] ]) : string
Parameters
$partsData : array<string|int, mixed>
$params : array<string|int, mixed> = []
Return values
string

getDeferredPostMode()

Returns current post mode state.

public getDeferredPostMode() : bool
Return values
bool

getInstance()

Returns existing class instance or creates new.

public static getInstance(int $taskId, int $authorId) : CommentPoster|null
Parameters
$taskId : int
$authorId : int
Return values
CommentPoster|null

postComments()

Posts comments from collection.

public postComments() : void

postCommentsOnTaskAdd()

Builds and posts comments on task add if deferred post mode is off.

public postCommentsOnTaskAdd(array<string|int, mixed> $taskData) : void
Parameters
$taskData : array<string|int, mixed>

postCommentsOnTaskExpired()

Builds and posts comments on task expired if deferred post mode is off.

public postCommentsOnTaskExpired(array<string|int, mixed> $taskData) : void
Parameters
$taskData : array<string|int, mixed>

postCommentsOnTaskExpiredSoon()

Builds and posts comments on task expired soon if deferred post mode is off.

public postCommentsOnTaskExpiredSoon(array<string|int, mixed> $taskData) : void
Parameters
$taskData : array<string|int, mixed>

postCommentsOnTaskStatusPinged()

public postCommentsOnTaskStatusPinged(array<string|int, mixed> $taskData) : void
Parameters
$taskData : array<string|int, mixed>

postCommentsOnTaskUpdate()

Builds and posts comments on task update if deferred post mode is off.

public postCommentsOnTaskUpdate(array<string|int, mixed> $oldFields, array<string|int, mixed> $newFields, array<string|int, mixed> $changes) : void
Parameters
$oldFields : array<string|int, mixed>
$newFields : array<string|int, mixed>
$changes : array<string|int, mixed>
Tags
throws
ArgumentException
throws
ObjectPropertyException
throws
SystemException

        
On this page

Search results