Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
ScribuntoHooks | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
onScribuntoExternalLibraries | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\DisplayTitle; |
4 | |
5 | use MediaWiki\Extension\Scribunto\Hooks\ScribuntoExternalLibrariesHook; |
6 | |
7 | class ScribuntoHooks implements |
8 | ScribuntoExternalLibrariesHook |
9 | { |
10 | /** |
11 | * Implements ScribuntoExternalLibraries hook. |
12 | * See https://www.mediawiki.org/wiki/Extension:Scribunto#Other_pages |
13 | * Handle Scribunto integration |
14 | * |
15 | * @since 1.2 |
16 | * @param string $engine engine in use |
17 | * @param array &$extraLibraries list of registered libraries |
18 | */ |
19 | public function onScribuntoExternalLibraries( string $engine, array &$extraLibraries ) { |
20 | if ( $engine === 'lua' ) { |
21 | $extraLibraries['mw.ext.displaytitle'] = DisplayTitleLuaLibrary::class; |
22 | } |
23 | } |
24 | } |