private $title = null;
/**
- * @var File
+ * @var LocalFile
*/
private $file = null;
/**
- * @var File
+ * @var LocalFile
*/
private $oldfile = null;
private $oldimage = '';
/**
- * @param File $file File object we're deleting
+ * @param LocalFile $file File object we're deleting
*/
public function __construct( $file ) {
$this->title = $file->getTitle();
$wgOut->enableOOUI();
+ $fields = [];
+
+ $fields[] = new OOUI\LabelWidget( [ 'label' => new OOUI\HtmlSnippet(
+ $this->prepareMessage( 'filedelete-intro' ) ) ]
+ );
+
$options = Xml::listDropDownOptions(
$wgOut->msg( 'filedelete-reason-dropdown' )->inContentLanguage()->text(),
[ 'other' => $wgOut->msg( 'filedelete-reason-otherlist' )->inContentLanguage()->text() ]
);
$options = Xml::listDropDownOptionsOoui( $options );
- $fields = [];
- $fields[] = new OOUI\LabelWidget( [ 'label' => new OOUI\HtmlSnippet(
- $this->prepareMessage( 'filedelete-intro' ) ) ]
- );
-
$fields[] = new OOUI\FieldLayout(
new OOUI\DropdownInputWidget( [
'name' => 'wpDeleteReasonList',
* value was provided, does it correspond to an
* existing, local, old version of this file?
*
- * @param File &$file
- * @param File &$oldfile
- * @param File $oldimage
+ * @param LocalFile &$file
+ * @param LocalFile &$oldfile
+ * @param LocalFile $oldimage
* @return bool
*/
public static function haveDeletableFile( &$file, &$oldfile, $oldimage ) {