39 if ( isset(
$params[
'autocomplete'] ) && is_bool(
$params[
'autocomplete'] ) ) {
45 if ( isset(
$params[
'placeholder-message'] ) ) {
46 $this->mPlaceholder = $this->
getMessage(
$params[
'placeholder-message'] )->text();
47 } elseif ( isset(
$params[
'placeholder'] ) ) {
48 $this->mPlaceholder =
$params[
'placeholder'];
51 $this->mAccept =
$params[
'accept'] ??
null;
52 $this->mMultiple = !empty(
$params[
'multiple'] );
59 return $request->getUpload( $this->mName )->getName();
73 if ( $this->mClass !==
'' ) {
76 if ( $this->mAccept ) {
77 $attribs[
'accept'] = implode(
',', $this->mAccept );
79 if ( $this->mMultiple ) {
80 $attribs[
'multiple'] =
'';
95 return Html::input( $this->mName, $value ??
'',
'file', $attribs );
105 if ( $this->mClass !==
'' ) {
108 if ( $this->mPlaceholder !==
'' ) {
111 if ( $this->mAccept ) {
114 if ( $this->mMultiple ) {
115 $attribs[
'multiple'] =
true;
118 # @todo Enforce pattern, step, required, readonly on the server side as
129 $attribs += \OOUI\Element::configFromHtmlAttributes(
135 'name' => $this->mName,
136 'dir' => $this->mDir,
148 return new \OOUI\SelectFileInputWidget(
$params );
161class_alias( HTMLFileField::class,
'HTMLFileField' );
array $params
The job parameters.