Manual:Hooks/GetSlotDiffRenderer
From Linux Web Expert
GetSlotDiffRenderer | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 445200)</tvar></translate> Replace or wrap the standard SlotDiffRenderer for some content type. | |
<translate> Define function:</translate> | public static function onGetSlotDiffRenderer( ContentHandler $contentHandler, &$slotDiffRenderer, IContextSource &$context ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"GetSlotDiffRenderer": "MediaWiki\\Extension\\MyExtension\\Hooks::onGetSlotDiffRenderer"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> content/ContentHandler.php <translate> Function(s):</translate> getSlotDiffRenderer |
<translate> Interface:</translate> | GetSlotDiffRendererHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:GetSlotDiffRenderer extensions</tvar>.</translate>
Details
$contentHandler
: ContentHandler for which the slot diff renderer is fetched.&$slotDiffRenderer
: SlotDiffRenderer to change or replace.$context
: IContextSource