$mModules = array(), # Modules to be loaded by the resource loader
$mModuleScripts = array(), # Modules of which only the JS will be loaded by the resource loader
$mModuleStyles = array(), # Modules of which only the CSSS will be loaded by the resource loader
- $mModuleMessages = array(), # Modules of which only the messages will be loaded by the resource loader
$mJsConfigVars = array(), # JavaScript config variable for mw.config combined with this page
$mOutputHooks = array(), # Hook tags as per $wgParserOutputHooks
$mWarnings = array(), # Warning text to be returned to the user. Wikitext formatted, in the key only
$mProperties = array(), # Name/value pairs to be cached in the DB
$mTOCHTML = '', # HTML of the TOC
$mTimestamp, # Timestamp of the revision
- $mTOCEnabled = true; # Whether TOC should be shown, can't override __NOTOC__
+ $mTOCEnabled = true, # Whether TOC should be shown, can't override __NOTOC__
+ $mEnableOOUI = false; # Whether OOUI should be enabled
private $mIndexPolicy = ''; # 'index' or 'noindex'? Any other value will result in no change.
private $mAccessedOptions = array(); # List of ParserOptions (stored in the keys)
private $mExtensionData = array(); # extra data used by extensions
$text = str_replace( array( Parser::TOC_START, Parser::TOC_END ), '', $text );
} else {
$text = preg_replace(
- '#' . preg_quote( Parser::TOC_START ) . '.*?' . preg_quote( Parser::TOC_END ) . '#s',
+ '#' . preg_quote( Parser::TOC_START, '#' ) . '.*?' . preg_quote( Parser::TOC_END, '#' ) . '#s',
'',
$text
);
return $this->mModuleStyles;
}
+ /**
+ * @deprecated since 1.26 Obsolete
+ * @return array
+ */
public function getModuleMessages() {
- return $this->mModuleMessages;
+ wfDeprecated( __METHOD__, '1.26' );
+ return array();
}
/** @since 1.23 */
return $this->mTOCEnabled;
}
+ public function getEnableOOUI() {
+ return $this->mEnableOOUI;
+ }
+
public function setText( $text ) {
return wfSetVar( $this->mText, $text );
}
$this->mIndicators[$id] = $content;
}
+ /**
+ * Enables OOUI, if true, in any OutputPage instance this ParserOutput
+ * object is added to.
+ *
+ * @since 1.26
+ * @param bool $enable If OOUI should be enabled or not
+ */
+ public function setEnableOOUI( $enable = false ) {
+ $this->mEnableOOUI = $enable;
+ }
+
public function addLanguageLink( $t ) {
$this->mLanguageLinks[] = $t;
}
$this->mModuleStyles = array_merge( $this->mModuleStyles, (array)$modules );
}
+ /**
+ * @deprecated since 1.26 Use addModules() instead
+ * @param string|array $modules
+ */
public function addModuleMessages( $modules ) {
- $this->mModuleMessages = array_merge( $this->mModuleMessages, (array)$modules );
+ wfDeprecated( __METHOD__, '1.26' );
}
/**
$this->addModules( $out->getModules() );
$this->addModuleScripts( $out->getModuleScripts() );
$this->addModuleStyles( $out->getModuleStyles() );
- $this->addModuleMessages( $out->getModuleMessages() );
$this->addJsConfigVars( $out->getJsConfigVars() );
$this->mHeadItems = array_merge( $this->mHeadItems, $out->getHeadItemsArray() );