Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Page\Hook; |
4 | |
5 | use MediaWiki\Page\ProperPageIdentity; |
6 | use MediaWiki\Permissions\Authority; |
7 | use StatusValue; |
8 | |
9 | /** |
10 | * This is a hook handler interface, see docs/Hooks.md. |
11 | * Use the hook name "PageDelete" to register handlers implementing this interface. |
12 | * |
13 | * @stable to implement |
14 | * @ingroup Hooks |
15 | */ |
16 | interface PageDeleteHook { |
17 | /** |
18 | * This hook is called before a page is deleted. |
19 | * |
20 | * @since 1.37 |
21 | * |
22 | * @param ProperPageIdentity $page Page being deleted. |
23 | * @param Authority $deleter Who is deleting the page |
24 | * @param string $reason Reason the page is being deleted |
25 | * @param StatusValue $status Add any error here |
26 | * @param bool $suppress Whether this is a suppression deletion or not |
27 | * @return bool|void True or no return value to continue; false to abort, which also requires adding |
28 | * a fatal error to $status. |
29 | */ |
30 | public function onPageDelete( |
31 | ProperPageIdentity $page, |
32 | Authority $deleter, |
33 | string $reason, |
34 | StatusValue $status, |
35 | bool $suppress |
36 | ); |
37 | } |