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\Status\Status; |
6 | use MediaWiki\User\User; |
7 | use WikiPage; |
8 | |
9 | /** |
10 | * This is a hook handler interface, see docs/Hooks.md. |
11 | * Use the hook name "ArticleDelete" to register handlers implementing this interface. |
12 | * |
13 | * @ingroup Hooks |
14 | * @deprecated since 1.37, use PageDeleteHook instead. The new hook uses more modern typehints and requires callers |
15 | * to add errors to $status, rather than the $error parameter. |
16 | */ |
17 | interface ArticleDeleteHook { |
18 | /** |
19 | * This hook is called before an article is deleted. |
20 | * |
21 | * @since 1.35 |
22 | * |
23 | * @param WikiPage $wikiPage WikiPage being deleted |
24 | * @param User $user User deleting the article |
25 | * @param string &$reason Reason the article is being deleted |
26 | * @param string &$error If the deletion was prohibited, the (raw HTML) error message to display |
27 | * (added in 1.13) |
28 | * @param Status &$status Modify this to throw an error. Overridden by $error |
29 | * (added in 1.20) |
30 | * @param bool $suppress Whether this is a suppression deletion or not (added in 1.27) |
31 | * @return bool|void True or no return value to continue or false to abort |
32 | */ |
33 | public function onArticleDelete( WikiPage $wikiPage, User $user, &$reason, &$error, Status &$status, |
34 | $suppress |
35 | ); |
36 | } |