58 if ( is_int( $revision ) ) {
59 wfDeprecated( __METHOD__ .
' with integer revision id',
'1.42' );
61 } elseif ( $revision !==
null ) {
62 $revId = $revision->getId();
63 $revTimestamp = $revision->getTimestamp();
65 if ( is_bool( $hints ) ) {
67 $hints = [
'generate-html' => $hints ];
70 $contentHandler = $this->contentHandlerFactory->getContentHandler( $content->
getModel() );
71 $cpoParams =
new ContentParseParams(
75 $hints[
'generate-html'] ??
true,
76 $hints[
'previous-output'] ??
null
79 $parserOutput = $contentHandler->getParserOutput( $content, $cpoParams );
90 if ( !$parserOutput->hasCacheTime() ) {
91 $parserOutput->setCacheTime( $cacheTime );
93 if ( $parserOutput->getRenderId() ===
null ) {
94 $parserOutput->setRenderId( $this->globalIdGenerator->newUUIDv1() );
98 if ( $parserOutput->getCacheRevisionId() ===
null && $revId !==
null ) {
99 $parserOutput->setCacheRevisionId( $revId );
101 if ( $parserOutput->getRevisionTimestamp() ===
null && $revTimestamp !==
null ) {
102 $parserOutput->setRevisionTimestamp( $revTimestamp );
104 return $parserOutput;