Bitrix API

Feed extends BaseObject

Table of Contents

Constants

ERROR_PARAMS_ENTITY_ID  = 'params0003'
ERROR_PARAMS_FORUM_ID  = 'params0001'
ERROR_PARAMS_MESSAGE  = 'params0004'
ERROR_PARAMS_TOPIC_ID  = 'params0002'
ERROR_PERMISSION  = 'params0005'

Methods

__construct()  : mixed
add()  : array<string|int, mixed>|bool
Add a comment like from a person
addComment()  : array<string|int, mixed>|null
Add a comment in general
addServiceComment()  : array<string|int, mixed>|null
canAdd()  : bool
Returns true if entity allows adding
canDelete()  : bool
Returns true if entity allows deleting.
canDeleteComment()  : bool
canEdit()  : bool
Returns true if entity allows editing
canEditComment()  : bool
canEditOwn()  : bool
canModerate()  : bool
canRead()  : bool
Returns true if entity allows reading
delete()  : array<string|int, mixed>|bool
Delete a comment
edit()  : array<string|int, mixed>|bool
Edit a comment
getApplication()  : CMain
getEntity()  : Entity
Returns entity which manage all rights. For example forum topic or task
getErrors()  : array<string|int, mixed>
getForum()  : array<string|int, mixed>
Returns forum
getPermission()  : string
Returns permission From list: A < E < I < M < Q < U < Y.
getTopic()  : array<string|int, mixed>
Returns forum topic
getUser()  : User
getUserUnreadMessageId()  : mixed
hasErrors()  : bool
moderate()  : array<string|int, mixed>|bool
Moderate comment with id
moveEventCommentsToNewXmlId()  : bool
send()  : bool
Render comment through the component and send into pull
setEditOwn()  : $this
setForumFields()  : $this
Redefines forum params
setPermission()  : $this
Mainly this function for forum entity. In this case params have to from the list: A < E < I < M < Q < U < Y A - NO ACCESS E - READ I - ANSWER M - NEW TOPIC Q - MODERATE U - EDIT Y - FULL_ACCESS
setUserAsRead()  : mixed
setUserLocation()  : mixed

Constants

ERROR_PARAMS_ENTITY_ID

public mixed ERROR_PARAMS_ENTITY_ID = 'params0003'

ERROR_PARAMS_FORUM_ID

public mixed ERROR_PARAMS_FORUM_ID = 'params0001'

ERROR_PARAMS_MESSAGE

public mixed ERROR_PARAMS_MESSAGE = 'params0004'

ERROR_PARAMS_TOPIC_ID

public mixed ERROR_PARAMS_TOPIC_ID = 'params0002'

ERROR_PERMISSION

public mixed ERROR_PERMISSION = 'params0005'

Methods

__construct()

public __construct(mixed $forumId, mixed $entity[, mixed $userId = null ]) : mixed
Parameters
$forumId : mixed
$entity : mixed
$userId : mixed = null

add()

Add a comment like from a person

public add(array<string|int, mixed> $params) : array<string|int, mixed>|bool
Parameters
$params : array<string|int, mixed>

Fields for new message to add in table b_forum_message.

Return values
array<string|int, mixed>|bool

addComment()

Add a comment in general

public addComment(array<string|int, mixed> $params) : array<string|int, mixed>|null
Parameters
$params : array<string|int, mixed>

Fields for new message to add in table b_forum_message.

Return values
array<string|int, mixed>|null

addServiceComment()

public addServiceComment(array<string|int, mixed> $data[, int $serviceType = ServiceManager::TYPE_FORUM_DEFAULT ][, array<string|int, mixed>|null $serviceData = null ]) : array<string|int, mixed>|null
Parameters
$data : array<string|int, mixed>
$serviceType : int = ServiceManager::TYPE_FORUM_DEFAULT
$serviceData : array<string|int, mixed>|null = null
Return values
array<string|int, mixed>|null

canAdd()

Returns true if entity allows adding

public canAdd() : bool
Return values
bool

canDelete()

Returns true if entity allows deleting.

public canDelete() : bool
Return values
bool

canDeleteComment()

public canDeleteComment(int $commentId) : bool
Parameters
$commentId : int

Message ID in b_forum_message to delete.

Return values
bool

canEdit()

Returns true if entity allows editing

public canEdit() : bool
Return values
bool

canEditComment()

public canEditComment(int $commentId) : bool
Parameters
$commentId : int

Message ID in b_forum_message to edit.

Return values
bool

canEditOwn()

public canEditOwn() : bool
Return values
bool

canModerate()

public canModerate() : bool
Return values
bool

canRead()

Returns true if entity allows reading

public canRead() : bool
Return values
bool

delete()

Delete a comment

public delete(int $id) : array<string|int, mixed>|bool
Parameters
$id : int

Message id.

Return values
array<string|int, mixed>|bool

edit()

Edit a comment

public edit(int $id, array<string|int, mixed> $params) : array<string|int, mixed>|bool
Parameters
$id : int

Message id.

$params : array<string|int, mixed>

Fields to edit message.

Return values
array<string|int, mixed>|bool

getApplication()

public getApplication() : CMain
Return values
CMain

getEntity()

Returns entity which manage all rights. For example forum topic or task

public getEntity() : Entity
Return values
Entity

getErrors()

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

getForum()

Returns forum

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

getPermission()

Returns permission From list: A < E < I < M < Q < U < Y.

public getPermission() : string
Return values
string

getTopic()

Returns forum topic

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

getUserUnreadMessageId()

public getUserUnreadMessageId() : mixed

hasErrors()

public hasErrors() : bool
Return values
bool

moderate()

Moderate comment with id

public moderate(int $id, bool $show) : array<string|int, mixed>|bool
Parameters
$id : int

Message id.

$show : bool

State for moderating: true - show, false - hide.

Return values
array<string|int, mixed>|bool

moveEventCommentsToNewXmlId()

public moveEventCommentsToNewXmlId(string $newEntityXmlId) : bool
Parameters
$newEntityXmlId : string
Return values
bool

send()

Render comment through the component and send into pull

public send(int $id, array<string|int, mixed> $params) : bool
Parameters
$id : int

Message id.

$params : array<string|int, mixed>

Params for component including.

Return values
bool

setEditOwn()

public setEditOwn(bool $allow) : $this
Parameters
$allow : bool

True or false.

Return values
$this

setForumFields()

Redefines forum params

public setForumFields(array<string|int, mixed> $params) : $this
Parameters
$params : array<string|int, mixed>

Array(key=>value, key2=>value2) of fields to redefine forum fields.

Return values
$this

setPermission()

Mainly this function for forum entity. In this case params have to from the list: A < E < I < M < Q < U < Y A - NO ACCESS E - READ I - ANSWER M - NEW TOPIC Q - MODERATE U - EDIT Y - FULL_ACCESS

public setPermission(string $permission) : $this
Parameters
$permission : string

A,E,I,M,Q,U,Y.

Return values
$this

setUserLocation()

public setUserLocation() : mixed

        
On this page

Search results