Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
RecoverableTitleExceptionPage
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 getHtml
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace FileImporter\Html;
4
5use FileImporter\Exceptions\RecoverableTitleException;
6use OOUI\HtmlSnippet;
7use OOUI\MessageWidget;
8
9/**
10 * Html showing an error and the ChangeTitleForm
11 *
12 * @license GPL-2.0-or-later
13 * @author Addshore
14 */
15class RecoverableTitleExceptionPage extends SpecialPageHtmlFragment {
16
17    public function getHtml( RecoverableTitleException $exception ): string {
18        $msg = $exception->getMessageObject()->inLanguage( $this->getLanguage() );
19        return new MessageWidget( [
20            'label' => new HtmlSnippet( $msg->parse() ),
21            'type' => 'warning',
22        ] ) .
23        '<br>' .
24        ( new ChangeFileNameForm( $this ) )->getHtml( $exception->getImportPlan() );
25    }
26
27}