mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-23 21:53:40 +00:00
4382b2f8e1
* Class names should not have underscores * No class alias is created, as there is no usage expected outside of the extension. Change-Id: I50f1271a773d1045262135c707496a289f6ddf28
27 lines
631 B
PHP
27 lines
631 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'] = LuaTitleBlacklistLibrary::class;
|
|
}
|
|
}
|
|
}
|