MediaWiki REL1_39
MediaWiki\Hook\FormatAutocommentsHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inheritance diagram for MediaWiki\Hook\FormatAutocommentsHook:

Public Member Functions

 onFormatAutocomments (&$comment, $pre, $auto, $post, $title, $local, $wikiId)
 This hook is called when an autocomment is formatted by the Linker.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "FormatAutocomments" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 14 of file FormatAutocommentsHook.php.

Member Function Documentation

◆ onFormatAutocomments()

MediaWiki\Hook\FormatAutocommentsHook::onFormatAutocomments ( & $comment,
$pre,
$auto,
$post,
$title,
$local,
$wikiId )

This hook is called when an autocomment is formatted by the Linker.

Since
1.35
Parameters
string | null&$commentReference to the accumulated comment. Initially null, when set the default code will be skipped.
bool$preTrue if there is text before this autocomment
string$autoExtracted part of the parsed comment before the call to the hook
bool$postTrue if there is text after this autocomment
Title | null$titleOptional title object used to links to sections
bool$localWhether section links should refer to local page
string | null$wikiIdID (as used by WikiMap) of the wiki from which the autocomment originated; null for the local wiki. Added in 1.26, should default to null in handler functions, for backwards compatibility.
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: