mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-24 06:04:05 +00:00
319b33cb46
Bug: T271033 Change-Id: I486bf703a73d6196c7bb840ac37b290615c548e7
27 lines
641 B
PHP
27 lines
641 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\TitleBlacklist;
|
|
|
|
use MediaWiki\Extension\Scribunto\Hooks\ScribuntoExternalLibrariesHook;
|
|
|
|
/**
|
|
* Hooks from Scribunto extension,
|
|
* which is optional to use with this extension.
|
|
*
|
|
* @ingroup Extensions
|
|
*/
|
|
class ScribuntoHooks implements ScribuntoExternalLibrariesHook {
|
|
|
|
/**
|
|
* External Lua library for Scribunto
|
|
*
|
|
* @param string $engine
|
|
* @param array &$extraLibraries
|
|
*/
|
|
public function onScribuntoExternalLibraries( string $engine, array &$extraLibraries ) {
|
|
if ( $engine === 'lua' ) {
|
|
$extraLibraries['mw.ext.TitleBlacklist'] = Scribunto_LuaTitleBlacklistLibrary::class;
|
|
}
|
|
}
|
|
}
|