Comment extends Comment
Table of Contents
Constants
- MODULE_NAME = 'forum'
Methods
- add() : Result
- Add new task comment
- delete() : Result|bool
- Remove task comment
- getForumId() : mixed
- getParser() : mixed
- getUrlParameters() : mixed
- makeUrl() : mixed
- makeUrlHash() : mixed
- onAfterAdd() : mixed
- Event callback for comment add. Fires on forum::OnAfterCommentAdd
- onAfterDelete() : void
- onAfterUpdate() : mixed
- Event callback for comment update\delete. Fires on forum::OnAfterCommentUpdate. Also this is used for socialnetwork`s Live Feed.
- onBeforeAdd() : void
- onBeforeDelete() : void
- onBeforeUpdate() : void
- onCommentSave() : mixed
- onPrepareComments() : mixed
- update() : Result|bool
- Update an existing task comment
Constants
MODULE_NAME
public
mixed
MODULE_NAME
= 'forum'
Methods
add()
Add new task comment
public
static add(mixed $taskId, array<string|int, mixed> $data) : Result
Parameters
- $taskId : mixed
- $data : array<string|int, mixed>
Tags
Return values
Resultdelete()
Remove task comment
public
static delete(mixed $id[, bool $taskId = false ]) : Result|bool
Parameters
- $id : mixed
- $taskId : bool = false
Tags
Return values
Result|boolgetForumId()
public
static getForumId() : mixed
getParser()
public
static getParser([array<string|int, mixed> $parameters = array() ]) : mixed
Parameters
- $parameters : array<string|int, mixed> = array()
getUrlParameters()
public
static getUrlParameters(mixed $commentId) : mixed
Parameters
- $commentId : mixed
makeUrl()
public
static makeUrl(mixed $url, mixed $commentId) : mixed
Parameters
- $url : mixed
- $commentId : mixed
makeUrlHash()
public
static makeUrlHash(mixed $commentId) : mixed
Parameters
- $commentId : mixed
onAfterAdd()
Event callback for comment add. Fires on forum::OnAfterCommentAdd
public
static onAfterAdd(mixed $entityType, mixed $taskId, mixed $arData) : mixed
This is not a part of public API. This function is for internal use only.
This function WILL send notifications in case of comment add through bitrix:forum.comments component Also, socialnetwork`s Live Feed uses modern forum API now to store comments for task-related block. This API subsequently fires forum::OnAfterCommentAdd, and, as a result, it comes to this function. So we got an isomorphic handler relative to the comment feed and Live Feed.
Parameters
- $entityType : mixed
- $taskId : mixed
- $arData : mixed
Tags
onAfterDelete()
public
static onAfterDelete(mixed $entityType, mixed $taskId, mixed $data) : void
Parameters
- $entityType : mixed
- $taskId : mixed
- $data : mixed
onAfterUpdate()
Event callback for comment update\delete. Fires on forum::OnAfterCommentUpdate. Also this is used for socialnetwork`s Live Feed.
public
static onAfterUpdate(mixed $entityType, mixed $taskID, mixed $arData) : mixed
This is not a part of public API. This function is for internal use only.
Parameters
- $entityType : mixed
- $taskID : mixed
- $arData : mixed
Tags
onBeforeAdd()
public
static onBeforeAdd(mixed $entityType, mixed $taskId, mixed $data) : void
Parameters
- $entityType : mixed
- $taskId : mixed
- $data : mixed
onBeforeDelete()
public
static onBeforeDelete(mixed $entityType, mixed $taskId, mixed $data) : void
Parameters
- $entityType : mixed
- $taskId : mixed
- $data : mixed
onBeforeUpdate()
public
static onBeforeUpdate(mixed $entityType, mixed $taskId, mixed $data) : void
Parameters
- $entityType : mixed
- $taskId : mixed
- $data : mixed
onCommentSave()
public
static onCommentSave(mixed $entityType, mixed $taskId, mixed $commentId, mixed &$data) : mixed
Parameters
- $entityType : mixed
- $taskId : mixed
- $commentId : mixed
- $data : mixed
onPrepareComments()
public
static onPrepareComments(mixed $component) : mixed
Parameters
- $component : mixed
update()
Update an existing task comment
public
static update(mixed $id, array<string|int, mixed> $data[, bool $taskId = false ]) : Result|bool
Parameters
- $id : mixed
- $data : array<string|int, mixed>
- $taskId : bool = false