Documentation

update

$comment = \CTaskCommentItem(\CTaskItem $task, $commentId);
$comment->update($fields);

Non-static method for modifying comment.

Parameters

Fields are the same as in the method for creating comments.

Example


Example of use in REST

http://site.bx/rest/1/SECRETKEY/tasks.task.comments.update?taskId=1&commentId=1&fields[POST_MESSAGE]=hello%20world%202!

Comment creating event can be subscribed to:

RegisterModuleDependences('forum', 'OnCommentUpdate', 'tasks', 'YourClass', 'OnCommentUpdate');

RegisterModuleDependences('forum', 'OnAfterCommentUpdate', 'tasks', 'YourClass', 'OnAfterCommentUpdate');


© «Bitrix24», 2001-2024
Up