MediaWiki
master
|
Provides methods for conversion between PageBundle and ParserOutput TODO: Convert to a trait once we drop support for PHP < 8.2 since support for constants in traits was added in PHP 8.2. More...
Static Public Member Functions | |
static | hasPageBundle (ParserOutput $parserOutput) |
static | pageBundleFromParserOutput (ParserOutput $parserOutput) |
Returns a Parsoid PageBundle equivalent to the given ParserOutput. More... | |
static | parserOutputFromPageBundle (PageBundle $pageBundle, ?ParserOutput $originalParserOutput=null) |
Creates a ParserOutput object containing the relevant data from the given PageBundle object. More... | |
Provides methods for conversion between PageBundle and ParserOutput TODO: Convert to a trait once we drop support for PHP < 8.2 since support for constants in traits was added in PHP 8.2.
Definition at line 15 of file PageBundleParserOutputConverter.php.
|
static |
Definition at line 88 of file PageBundleParserOutputConverter.php.
References ParserOutput\getExtensionData().
|
static |
Returns a Parsoid PageBundle equivalent to the given ParserOutput.
ParserOutput | $parserOutput |
Definition at line 74 of file PageBundleParserOutputConverter.php.
|
static |
Creates a ParserOutput object containing the relevant data from the given PageBundle object.
We need to inject data-parsoid and other properties into the parser output object for caching, so we can use it for VE edits and transformations.
PageBundle | $pageBundle | |
?ParserOutput | $originalParserOutput Any non-parsoid metadata from $originalParserOutput will be copied into the new ParserOutput object. |
Definition at line 42 of file PageBundleParserOutputConverter.php.
References ParserOutput\mergeHtmlMetaDataFrom().