$outputPage = new OutputPage( $context );
$outputPage->addParserOutputMetadata( $p_result );
+ if ( $this->content ) {
+ $outputPage->addContentOverride( $titleObj, $this->content );
+ }
$context->setOutput( $outputPage );
if ( $skin ) {
// Based on OutputPage::headElement()
$skin->setupSkinUserCss( $outputPage );
// Based on OutputPage::output()
- foreach ( $skin->getDefaultModules() as $group ) {
- $outputPage->addModules( $group );
- }
+ $outputPage->loadSkinModules( $skin );
}
+
+ Hooks::run( 'ApiParseMakeOutputPage', [ $this, $outputPage ] );
}
if ( !is_null( $oldid ) ) {
$hiddencats[$row->page_title] = isset( $row->pp_propname );
}
- $linkCache = LinkCache::singleton();
+ $linkCache = MediaWikiServices::getInstance()->getLinkCache();
foreach ( $links as $link => $sortkey ) {
$entry = [];