Manual:Hooks/GetDifferenceEngine/de

From mediawiki.org
This page is a translated version of the page Manual:Hooks/GetDifferenceEngine and the translation is 10% complete.
Other languages:
GetDifferenceEngine
Erhältlich ab Version 1.25.0 (Gerrit change 166143)
Allows custom difference engine extensions such as Extension:WikEdDiff.
Funktion definieren:
public static function onGetDifferenceEngine( $context, $old, $new, $refreshCache, $unhide, &$differenceEngine ) { ... }
Haken anbringen: In extension.json:
{
	"Hooks": {
		"GetDifferenceEngine": "MyExtensionHooks::onGetDifferenceEngine"
	}
}
Angerufen von: Datei(en): content/ContentHandler.php
Interface: GetDifferenceEngineHook.php

For more information about attaching hooks, see Handbuch:Hooks .
For examples of extensions using this hook, see Category:GetDifferenceEngine extensions/de.

Details

Called when getting a new difference engine interface object. Return false for valid object in $differenceEngine or true for the default difference engine.

  • $context: IContextSource context to be used for diff
  • $old: Revision ID to show and diff with
  • $new: Either a revision ID or one of the strings 'cur', 'prev' or 'next'
  • $refreshCache: If set, refreshes the diff cache
  • $unhide: If set, allow viewing deleted revs
  • &$differenceEngine: output parameter, difference engine object to be used for diff