wiki.techinc.nl/includes/page/Hook/PageDeleteCompleteHook.php
Daimona Eaytoy 377342de86 Deprecate and replace legacy hooks in DeletePage
In both cases the typehints were changed to the new interfaces. For the
ArticleDelete hook, the replacement has no $error param and requires the
caller to set a fatal status if it wants to abort.

Bug: T288758
Change-Id: I9540f6ab2075bcf56bd4fdc79c611c883246cdce
2021-09-16 19:13:35 +02:00

41 lines
1.2 KiB
PHP

<?php
namespace MediaWiki\Page\Hook;
use ManualLogEntry;
use MediaWiki\Page\ProperPageIdentity;
use MediaWiki\Permissions\Authority;
use MediaWiki\Revision\RevisionRecord;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "PageDeleteComplete" to register handlers implementing this interface.
*
* @stable to implement
* @ingroup Hooks
*/
interface PageDeleteCompleteHook {
/**
* This hook is called after a page is deleted.
*
* @since 1.37
*
* @param ProperPageIdentity $page Page that was deleted.
* @param Authority $deleter Who deleted the page
* @param string $reason Reason the page was deleted
* @param int $pageID ID of the page that was deleted
* @param RevisionRecord $deletedRev Last revision of the deleted page
* @param ManualLogEntry $logEntry ManualLogEntry used to record the deletion
* @param int $archivedRevisionCount Number of revisions archived during the deletion
* @return true|void
*/
public function onPageDeleteComplete(
ProperPageIdentity $page,
Authority $deleter,
string $reason,
int $pageID,
RevisionRecord $deletedRev,
ManualLogEntry $logEntry,
int $archivedRevisionCount
);
}