mediawiki-extensions-Tabber.../includes/Hooks.php
2022-06-29 17:22:14 -04:00

33 lines
826 B
PHP

<?php
declare( strict_types=1 );
namespace MediaWiki\Extension\TabberNeue;
use MediaWiki\Hook\ParserFirstCallInitHook;
use OutputPage;
use Parser;
use Skin;
class Hooks implements ParserFirstCallInitHook {
/**
* @see https://www.mediawiki.org/wiki/Extension:MobileFrontend/BeforePageDisplayMobile
*
* @param OutputPage $out
* @param Skin $sk
*/
public static function onBeforePageDisplayMobile( OutputPage $out, Skin $sk ) {
$out->addModuleStyles( [ 'ext.tabberNeue.mobile.styles' ] );
}
/**
* @see https://www.mediawiki.org/wiki/Manual:Hooks/ParserFirstCallInit
*
* @param Parser $parser
*/
public function onParserFirstCallInit( $parser ) {
$parser->setHook( 'tabber', Tabber::class . '::parserHook' );
$parser->setHook( 'tabbertransclude', TabberTransclude::class . '::parserHook' );
}
}