MediaWiki REL1_40
|
B/C adapter for turning a DifferenceEngine into a SlotDiffRenderer. More...
Inherits SlotDiffRenderer.
Public Member Functions | ||||
__construct (DifferenceEngine $differenceEngine) | ||||
addModules (OutputPage $output) | ||||
Add modules needed for correct styling/behavior of the diff.
| ||||
getDiff (Content $oldContent=null, Content $newContent=null) | ||||
Get a diff between two content objects.One of them might be null (meaning a slot was created or removed), but both cannot be. $newContent (or if it's null then $oldContent) must have the same content model that was used to obtain this diff renderer.
| ||||
getExtraCacheKeys () | ||||
Return any extra keys to split the diff cache by.
| ||||
Additional Inherited Members | |
Protected Member Functions inherited from SlotDiffRenderer | |
normalizeContents (Content &$oldContent=null, Content &$newContent=null, $allowedClasses=null) | |
Helper method to normalize the input of getDiff(). | |
B/C adapter for turning a DifferenceEngine into a SlotDiffRenderer.
Before SlotDiffRenderer was introduced, getDiff() functionality was provided by DifferenceEngine subclasses. Convert such a subclass into a SlotDiffRenderer.
Definition at line 32 of file DifferenceEngineSlotDiffRenderer.php.
DifferenceEngineSlotDiffRenderer::__construct | ( | DifferenceEngine | $differenceEngine | ) |
DifferenceEngine | $differenceEngine |
Definition at line 40 of file DifferenceEngineSlotDiffRenderer.php.
References CONTENT_MODEL_WIKITEXT, and DifferenceEngine\setContent().
DifferenceEngineSlotDiffRenderer::addModules | ( | OutputPage | $output | ) |
Add modules needed for correct styling/behavior of the diff.
OutputPage | $output |
Reimplemented from SlotDiffRenderer.
Definition at line 61 of file DifferenceEngineSlotDiffRenderer.php.
References ContextSource\getOutput().
DifferenceEngineSlotDiffRenderer::getDiff | ( | Content | $oldContent = null, |
Content | $newContent = null ) |
Get a diff between two content objects.One of them might be null (meaning a slot was created or removed), but both cannot be. $newContent (or if it's null then $oldContent) must have the same content model that was used to obtain this diff renderer.
Reimplemented from SlotDiffRenderer.
Definition at line 55 of file DifferenceEngineSlotDiffRenderer.php.
References SlotDiffRenderer\normalizeContents().
DifferenceEngineSlotDiffRenderer::getExtraCacheKeys | ( | ) |
Return any extra keys to split the diff cache by.
Reimplemented from SlotDiffRenderer.
Definition at line 76 of file DifferenceEngineSlotDiffRenderer.php.