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\Hook; |
4 | |
5 | use MediaWiki\EditPage\EditPage; |
6 | |
7 | /** |
8 | * This is a hook handler interface, see docs/Hooks.md. |
9 | * Use the hook name "EditFilter" to register handlers implementing this interface. |
10 | * |
11 | * @stable to implement |
12 | * @ingroup Hooks |
13 | */ |
14 | interface EditFilterHook { |
15 | /** |
16 | * Use this hook to perform checks on an edit. |
17 | * |
18 | * @since 1.35 |
19 | * |
20 | * @param EditPage $editor Edit form (see includes/EditPage.php) |
21 | * @param string $text Contents of the edit box |
22 | * @param string $section Section being edited |
23 | * @param string &$error Error message to return |
24 | * @param string $summary Edit summary for page |
25 | * @return bool|void True or no return value without altering $error to allow the |
26 | * edit to continue. Modifying $error and returning true will cause the contents |
27 | * of $error to be echoed at the top of the edit form as wikitext. Return false |
28 | * to halt editing; you'll need to handle error messages, etc. yourself. |
29 | */ |
30 | public function onEditFilter( $editor, $text, $section, &$error, $summary ); |
31 | } |