Jump to content

Extension:Comments/Hooks/Comment::edit

From mediawiki.org
Comment::edit
Available from version ??? (Gerrit change 661121)
Allows things to happen after a comment has been edited and potential notifications etc. have run.
Define function:
public static function onComment_edit( $comment, $commentId, $pageId ) { ... }
Attach hook:
$wgHooks['Comment::edit'][] = 'MyExtensionHooks::onComment_edit';
Called from:
File(s): Comments / includes/Comment.php
Function(s): edit

For more information about attaching hooks, see Manual:Hooks .
For examples of other extensions using this hook, see Category:Comment::edit extensions.

The Comment::edit hook is called after a comment has been edited, right before the Comment::edit method returns a value. The hook provides access to the Comment object ($comment), the ID of the recently modified comment ($commentId) and the ID of the page which contains the <code<comments /> tag ($pageId).


See also

[edit]