Manual:Hooks/EditPage::showReadOnlyForm:initial

From MediaWiki.org
Jump to: navigation, search
EditPage::showReadOnlyForm:initial
Available from version 1.24.0
Called just before the read only edit form is rendered
Define function:
public static function onEditPage_showReadOnlyForm_initial( EditPage $editPage, OutputPage $output ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"EditPage::showReadOnlyForm:initial": [
			"MyExtensionHooks::onEditPageshowReadOnlyForminitial"
		]
	}
}

For MediaWiki ≤1.25:

$wgHooks['EditPage::showReadOnlyForm:initial'][] = 'MyExtensionHooks::onEditPageshowReadOnlyForminitial';
Called from: File(s): EditPage.php

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

Details[edit]

Notes[edit]

This hook is analogous to Hooks/EditPage::showEditForm:initial, but used when the page is not in served in edit mode, but in read only mode.