Manual:Hooks/NamespaceIsMovable
From Linux Web Expert
NamespaceIsMovable | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> Called when determining if it is possible to move pages, for a particular namespace. This controls moves both to and from the given namespace. | |
<translate> Define function:</translate> | public static function onNamespaceIsMovable( $index, $result ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"NamespaceIsMovable": "MediaWiki\\Extension\\MyExtension\\Hooks::onNamespaceIsMovable"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> MWNamespace.php |
<translate> Interface:</translate> | NamespaceIsMovableHook.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:NamespaceIsMovable extensions</tvar>.</translate>
Details
- $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().