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\Content\Hook; |
4 | |
5 | use MediaWiki\Content\Content; |
6 | use WikiPage; |
7 | |
8 | /** |
9 | * This is a hook handler interface, see docs/Hooks.md. |
10 | * Use the hook name "PlaceNewSection" to register handlers implementing this interface. |
11 | * |
12 | * @stable to implement |
13 | * @ingroup Hooks |
14 | */ |
15 | interface PlaceNewSectionHook { |
16 | /** |
17 | * Use this hook to override placement of new sections. |
18 | * |
19 | * @since 1.35 |
20 | * |
21 | * @param WikiPage|Content $content Formerly a WikiPage, but accidentally a |
22 | * Content object since approximately 1.21 |
23 | * @param string $oldtext Text of the article before editing |
24 | * @param string $subject Subject of the new section |
25 | * @param string &$text Text of the new section |
26 | * @return bool|void True or no return value to continue, or false and put the |
27 | * merged text into $text to override the default behavior |
28 | */ |
29 | public function onPlaceNewSection( $content, $oldtext, $subject, &$text ); |
30 | } |