Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
OutputPageParserOutputHookHandler | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
onOutputPageParserOutput | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
6 |
1 | <?php |
2 | |
3 | declare( strict_types = 1 ); |
4 | |
5 | namespace EntitySchema\MediaWiki\Hooks; |
6 | |
7 | use MediaWiki\Output\Hook\OutputPageParserOutputHook; |
8 | use MediaWiki\Output\OutputPage; |
9 | use MediaWiki\Parser\ParserOutput; |
10 | |
11 | /** |
12 | * @license GPL-2.0-or-later |
13 | */ |
14 | class OutputPageParserOutputHookHandler implements OutputPageParserOutputHook { |
15 | |
16 | /** |
17 | * @param OutputPage $outputPage |
18 | * @param ParserOutput $parserOutput |
19 | */ |
20 | public function onOutputPageParserOutput( $outputPage, $parserOutput ): void { |
21 | $meta = $parserOutput->getExtensionData( 'entityschema-meta-tags' ); |
22 | if ( $meta ) { |
23 | $outputPage->setProperty( |
24 | 'entityschema-meta-tags', |
25 | $meta |
26 | ); |
27 | } |
28 | } |
29 | } |