vectorConfig = ConfigFactory::getDefaultInstance()->makeConfig( 'vector' ); } /** * 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' ) ) { $out->addMeta( 'viewport', 'width=device-width, initial-scale=1' ); $out->addModuleStyles( 'skins.vector.styles.responsive' ); } // Append CSS which includes IE only behavior fixes for hover support - // this is better than including this in a CSS file since it doesn't // wait for the CSS file to load before fetching the HTC file. $min = $this->getRequest()->getFuzzyBool( 'debug' ) ? '' : '.min'; $out->addHeadItem( 'csshover', '" ); $out->addModules( array( 'skins.vector.js' ) ); } /** * Loads skin and user CSS files. * @param OutputPage $out */ function setupSkinUserCss( OutputPage $out ) { parent::setupSkinUserCss( $out ); $styles = array( 'mediawiki.skinning.interface', 'skins.vector.styles' ); Hooks::run( 'SkinVectorStyleModules', array( $this, &$styles ) ); $out->addModuleStyles( $styles ); } /** * Override to pass our Config instance to it */ public function setupTemplate( $classname, $repository = false, $cache_dir = false ) { return new $classname( $this->vectorConfig ); } }