Manual:Hooks/NamespaceIsMovable

NamespaceIsMovable
Available from version 1.20.0
Called when determining if it is possible to move pages, for a particular namespace. This controls moves both to and from the given namespace.
Define function:
public static function onNamespaceIsMovable( $index, $result ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"NamespaceIsMovable": "MediaWiki\\Extension\\MyExtension\\Hooks::onNamespaceIsMovable"
	}
}
Called from: File(s): MWNamespace.php
Interface: NamespaceIsMovableHook.php

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


Details

edit
  • $index: Integer; the index of the namespace being checked.
  • $result: Boolean; whether MediaWiki currently thinks that pages in this namespace are movable. Hooks may change this value to override the return value of MWNamespace::isMovable().