25 return $this->mParams[
'size'] ?? 9;
30 if ( !empty( $this->mParams[
'disabled'] ) ) {
31 $attribs[
'disabled'] =
'disabled';
36 $minId = $this->mID .
'-mode-min';
38 $this->mName .
'-mode',
40 [
'id' => $minId,
'value' =>
'min' ] + $attribs
42 $html .=
"\u{00A0}" . Html::label( $this->
msg(
'minimum-size' )->text(), $minId, $attribs );
46 $maxId = $this->mID .
'-mode-max';
48 $this->mName .
'-mode',
50 [
'id' => $maxId,
'value' =>
'max' ] + $attribs
52 $html .=
"\u{00A0}" . Html::label( $this->
msg(
'maximum-size' )->text(), $maxId, $attribs );
54 $html .=
"\u{00A0}" . parent::getInputHTML( $value ? abs( $value ) :
'' );
55 $html .=
"\u{00A0}" . $this->
msg(
'pagesize' )->parse();
65 $this->mParent->getOutput()->addModuleStyles(
'mediawiki.widgets.SizeFilterWidget.styles' );
68 $value = $params[
'value'];
69 $params[
'value'] = $value ? abs( $value ) :
'';
72 'selectMin' => $this->mSelectMin,
73 'textinput' => $params,
74 'radioselectinput' => [
75 'name' => $this->mName .
'-mode',
76 'disabled' => !empty( $this->mParams[
'disabled'] ),
82 return [
'mediawiki.widgets.SizeFilterWidget' ];
91 $size = abs( $request->getInt( $this->mName, $this->getDefault() ) );
94 if ( $request->getRawVal( $this->mName .
'-mode' ) ===
'max' ) {
95 $this->mSelectMin =
false;
108class_alias( HTMLSizeFilterField::class,
'HTMLSizeFilterField' );