$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->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;
}