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 MediaWiki\Parser\ParserOutput; |
7 | use MediaWiki\Title\Title; |
8 | |
9 | /** |
10 | * This is a hook handler interface, see docs/Hooks.md. |
11 | * Use the hook name "ContentAlterParserOutput" to register handlers implementing this interface. |
12 | * |
13 | * @stable to implement |
14 | * @ingroup Hooks |
15 | */ |
16 | interface ContentAlterParserOutputHook { |
17 | /** |
18 | * Use this hook to modify parser output for a given content object. This hook is called by |
19 | * Content::getParserOutput after parsing has finished. Can be used for changes that depend |
20 | * on the result of the parsing but have to be done before LinksUpdate is called (such as |
21 | * adding tracking categories based on the rendered HTML). |
22 | * |
23 | * @since 1.35 |
24 | * |
25 | * @param Content $content Content to render |
26 | * @param Title $title Title of the page, as context |
27 | * @param ParserOutput $parserOutput ParserOutput to manipulate |
28 | * @return bool|void True or no return value to continue or false to abort |
29 | */ |
30 | public function onContentAlterParserOutput( $content, $title, $parserOutput ); |
31 | } |