Manual:Hooks/WatchlistEditorBeforeFormRender

From Linux Web Expert

WatchlistEditorBeforeFormRender
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 156119)</tvar></translate>
Occurs before building the Special:EditWatchlist form, used to manipulate the list of pages or preload data based on that list.
<translate> Define function:</translate>
public static function onWatchlistEditorBeforeFormRender( array &$watchlistInfo ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"WatchlistEditorBeforeFormRender": "MediaWiki\\Extension\\MyExtension\\Hooks::onWatchlistEditorBeforeFormRender"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> specials/SpecialEditWatchlist.php
<translate> Function(s):</translate> getNormalForm
<translate> Interface:</translate> WatchlistEditorBeforeFormRenderHook.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:WatchlistEditorBeforeFormRender extensions</tvar>.</translate>


Details

  • &$watchlistInfo: array of watch-listed pages in [namespaceId => ['title1' => 1, 'title2' => 1]] format

See also