Manual:Hooks/SpecialWatchlistGetNonRevisionTypes

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.
SpecialWatchlistGetNonRevisionTypes
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Allows extensions to register the value they have inserted to rc_type field of recentchanges for non-revision changes so they can be included in the watchlist.
<translate> Define function:</translate>
public static function onSpecialWatchlistGetNonRevisionTypes( array &$nonRevisionTypes ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"SpecialWatchlistGetNonRevisionTypes": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialWatchlistGetNonRevisionTypes"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> specialpage/ChangesListSpecialPage.php, specials/SpecialWatchlist.php
<translate> Interface:</translate> SpecialWatchlistGetNonRevisionTypesHook.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:SpecialWatchlistGetNonRevisionTypes extensions</tvar>.</translate>


Details

  • &$nonRevisionTypes: array of integers matching the rc_type field of the recentchanges table.

See also