Provides methods for conversion between HtmlPageBundle 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...
Provides methods for conversion between HtmlPageBundle 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.
- Since
- 1.40
- Access: internal
Definition at line 19 of file PageBundleParserOutputConverter.php.
◆ hasPageBundle()
| static MediaWiki\Parser\Parsoid\PageBundleParserOutputConverter::hasPageBundle |
( |
ParserOutput | $parserOutput | ) |
|
|
static |
◆ htmlPageBundleFromParserOutput()
| static MediaWiki\Parser\Parsoid\PageBundleParserOutputConverter::htmlPageBundleFromParserOutput |
( |
ParserOutput | $parserOutput | ) |
|
|
static |
Returns a Parsoid HtmlPageBundle equivalent to the given ParserOutput.
- Parameters
-
| ParserOutput | $parserOutput | |
- Returns
- HtmlPageBundle
Definition at line 90 of file PageBundleParserOutputConverter.php.
◆ pageBundleFromParserOutput()
| static MediaWiki\Parser\Parsoid\PageBundleParserOutputConverter::pageBundleFromParserOutput |
( |
ParserOutput | $parserOutput | ) |
|
|
static |
Returns a Parsoid HtmlPageBundle equivalent to the given ParserOutput.
- Parameters
-
| ParserOutput | $parserOutput | |
- Returns
- HtmlPageBundle
- Deprecated
- Use ::htmlPageBundleFromParserOutput
Definition at line 80 of file PageBundleParserOutputConverter.php.
◆ parserOutputFromPageBundle()
| static MediaWiki\Parser\Parsoid\PageBundleParserOutputConverter::parserOutputFromPageBundle |
( |
HtmlPageBundle | $pageBundle, |
|
|
?ParserOutput | $originalParserOutput = null ) |
|
static |
Creates a ParserOutput object containing the relevant data from the given HtmlPageBundle 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.
- Parameters
-
| HtmlPageBundle | $pageBundle | |
| ?ParserOutput | $originalParserOutput | Any non-parsoid metadata from $originalParserOutput will be copied into the new ParserOutput object. |
- Returns
- ParserOutput
Definition at line 47 of file PageBundleParserOutputConverter.php.
The documentation for this class was generated from the following file: