42 $this->localizer = $localizer;
49 $oldModel = $oldContent->getModel();
50 $newModel = $newContent->getModel();
52 if ( $oldModel !== $newModel ) {
53 $msg = $this->localizer->msg(
'unsupported-content-diff2', $oldModel, $newModel );
55 $msg = $this->localizer->msg(
'unsupported-content-diff', $oldModel );
58 return Html::rawElement(
63 [
'colspan' => 4,
'class' =>
'error' ],
Renders a diff for a single slot (that is, a diff between two content objects).
normalizeContents(?Content &$oldContent=null, ?Content &$newContent=null, $allowedClasses=null)
Helper method to normalize the input of getDiff().
Produces a warning message about not being able to render a slot 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 remov...
__construct(MessageLocalizer $localizer)
Base interface for representing page content.
Interface for localizing messages in MediaWiki.