Manual:Hooks/InitPreferencesForm

From MediaWiki.org
Jump to navigation Jump to search
InitPreferencesForm
Available from version 1.11.0
Removed in version 1.16.0
Called at the end of PreferencesForm's constructor
Define function:
public static function onInitPreferencesForm( $prefs, $request ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"InitPreferencesForm": "MyExtensionHooks::onInitPreferencesForm"
	}
}

For MediaWiki ≤1.25:

$wgHooks['InitPreferencesForm'][] = 'MyExtensionHooks::onInitPreferencesForm';
Called from:File(s): SpecialPreferences.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:InitPreferencesForm extensions.

Details[edit]

  • $prefs - The PreferencesForm object
  • $request - The WebRequest object