3 * Renders a slot diff by doing a text diff on the native representation.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
21 * @ingroup DifferenceEngine
25 * Produces a warning message about not being able to render a slot diff.
29 * @ingroup DifferenceEngine
31 class UnsupportedSlotDiffRenderer
extends SlotDiffRenderer
{
34 * @var MessageLocalizer
39 * UnsupportedSlotDiffRenderer constructor.
41 * @param MessageLocalizer $localizer
43 public function __construct( MessageLocalizer
$localizer ) {
44 $this->localizer
= $localizer;
48 public function getDiff( Content
$oldContent = null, Content
$newContent = null ) {
49 $this->normalizeContents( $oldContent, $newContent );
51 $oldModel = $oldContent->getModel();
52 $newModel = $newContent->getModel();
54 if ( $oldModel !== $newModel ) {
55 $msg = $this->localizer
->msg( 'unsupported-content-diff2', $oldModel, $newModel );
57 $msg = $this->localizer
->msg( 'unsupported-content-diff', $oldModel );
60 return Html
::rawElement(
65 [ 'colspan' => 4, 'class' => 'error' ],