vectorConfig = \MediaWiki\MediaWikiServices::getInstance()->getConfigFactory() ->makeConfig( 'vector' ); } /** * Enables the responsive mode */ public function enableResponsiveMode() { if ( !$this->responsiveMode ) { $out = $this->getOutput(); $out->addMeta( 'viewport', 'width=device-width, initial-scale=1' ); $out->addModuleStyles( 'skins.vector.styles.responsive' ); $this->responsiveMode = true; } } /** * Initializes output page and sets up skin-specific parameters * @param OutputPage $out Object to initialize */ public function initPage( OutputPage $out ) { parent::initPage( $out ); if ( $this->vectorConfig->get( 'VectorResponsive' ) ) { $this->enableResponsiveMode(); } $out->addModules( 'skins.vector.js' ); } /** * Loads skin and user CSS files. * @param OutputPage $out */ public function setupSkinUserCss( OutputPage $out ) { parent::setupSkinUserCss( $out ); $out->addModuleStyles( [ 'mediawiki.skinning.interface', 'skins.vector.styles', ] ); } /** * Override to pass our Config instance to it * @param string $classname * @param bool|string $repository * @param bool|string $cache_dir * @return QuickTemplate */ public function setupTemplate( $classname, $repository = false, $cache_dir = false ) { return new $classname( $this->vectorConfig ); } /** * Whether the logo should be preloaded with an HTTP link header or not * @since 1.29 * @return bool */ public function shouldPreloadLogo() { return true; } }