Manual:RenderedRevision.php
Appearance
MediaWiki file: RenderedRevision.php | |
---|---|
Location: | includes/Revision/ |
Source code: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Classes: | MediaWiki\Revision\RenderedRevision |
RenderedRevision represents the rendered representation of a revision. It acts as a lazy provider of ParserOutput objects for the revision's individual slots, as well as a combined ParserOutput of all slots. It implements the SlotRenderingProvider.
Instantiation
[edit]If you have access to the RevisionRecord , you can use the RevisionRenderer . For instance,
$renderer = MediaWikiServices::getInstance()->getRevisionRenderer();
$revision = $renderer->getRenderedRevision( $revisionRecord, $options, null );
Public methods
[edit]- setSaveParseLogger() - set logger with LoggerInterface.
- isContentDeleted() - whether the revision's content has been hidden from unprivileged users.
- getRevision() - get the RevisionRecord.
- getOptions() - get ParserOptions.
- getRevisionParserOutput() - get the ParserOutput for the revision.
- getSlotParserOutput() - get the ParserOutput for the given slot role.
- updateRevision() - update the RevisionRecord after the revision has been saved. This can be used to discard a cached ParserOutput so parser functions/magic words like {{REVISIONTIMESTAMP}} or {{REVISIONID}} are re-evaluated.