2022-04-20 17:11:10 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare( strict_types=1 );
|
|
|
|
|
|
|
|
namespace TabberNeue;
|
|
|
|
|
2022-04-20 18:00:28 +00:00
|
|
|
use MediaWiki\Hook\ParserFirstCallInitHook;
|
2022-04-20 17:11:10 +00:00
|
|
|
use Parser;
|
|
|
|
|
2022-04-23 22:41:14 +00:00
|
|
|
class Hooks implements ParserFirstCallInitHook {
|
2022-04-20 17:11:10 +00:00
|
|
|
/**
|
2022-04-20 18:00:28 +00:00
|
|
|
* @see https://www.mediawiki.org/wiki/Manual:Hooks/ParserFirstCallInit
|
2022-04-20 17:11:10 +00:00
|
|
|
*
|
2022-04-20 18:00:28 +00:00
|
|
|
* @param Parser $parser
|
2022-04-20 17:11:10 +00:00
|
|
|
*/
|
2022-04-20 18:00:28 +00:00
|
|
|
public function onParserFirstCallInit( $parser ) {
|
2022-04-20 19:23:45 +00:00
|
|
|
$parser->setHook( 'tabber', Tabber::class . '::parserHook' );
|
|
|
|
$parser->setHook( 'tabbertransclude', TabberTransclude::class . '::parserHook' );
|
2022-04-20 17:11:10 +00:00
|
|
|
}
|
2022-04-20 17:51:17 +00:00
|
|
|
}
|