Manual:Hooks/DifferenceEngineMarkPatrolledLink

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
DifferenceEngineMarkPatrolledLink
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 298026)</tvar></translate>
Allow extensions to change the markpatrolled link, which is shown both on the diff header as well as on the bottom of a page, usually wrapped in a ‎<span> element which has class="patrollink".
<translate> Define function:</translate>
public static function onDifferenceEngineMarkPatrolledLink( DifferenceEngine $differenceEngine, string &$markAsPatrolledLink, int $rcid ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"DifferenceEngineMarkPatrolledLink": "MediaWiki\\Extension\\MyExtension\\Hooks::onDifferenceEngineMarkPatrolledLink"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> diff/DifferenceEngine.php
<translate> Function(s):</translate> markPatrolledLink
<translate> Interface:</translate> DifferenceEngineMarkPatrolledLinkHook.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:DifferenceEngineMarkPatrolledLink extensions</tvar>.</translate>


Details

  • $differenceEngine: DifferenceEngine object
  • &$markAsPatrolledLink: The "mark as patrolled" link HTML (string)
  • $rcid: Recent change ID (rc_id) for this change (int)