Manual:Hooks/WikiPageDeletionUpdates
![]() | This deprecated feature should no longer be used, but is still available for reasons of backwards compatibility. This feature was deprecated in version 1.32.0. Please see PageDeletionDataUpdates for an alternative way to use this feature. |
WikiPageDeletionUpdates | |
---|---|
Available from version 1.21.0 manipulate the list of DeferrableUpdate s to be applied when a page is deleted. Called in WikiPage::getDeletionUpdates(). Note that updates specific to a content model should be provided by the respective Content's getDeletionUpdates() method. | |
Define function: | public static function onWikiPageDeletionUpdates( WikiPage $page, Content $content = null, array &$updates ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"WikiPageDeletionUpdates": "MyExtensionHooks::onWikiPageDeletionUpdates"
}
}
|
Called from: | File(s): page/WikiPage.php |
Interface: | WikiPageDeletionUpdatesHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:WikiPageDeletionUpdates extensions.
Details[edit]
- $page: the WikiPage
- $content: the Content to generate updates for, or null in case the page revision could not be loaded. The delete will succeed despite this.
- &$updates: the array of objects that implement
DeferrableUpdate
. Hook function may want to add to it.