25 return $this->mParams[
'size'] ?? 9;
31 if ( !empty( $this->mParams[
'disabled'] ) ) {
32 $attribs[
'disabled'] =
'disabled';
37 $minId = $this->mID .
'-mode-min';
39 $this->mName .
'-mode',
41 [
'id' => $minId,
'value' =>
'min' ] + $attribs
43 $html .=
"\u{00A0}" . Html::label( $this->
msg(
'minimum-size' )->text(), $minId, $attribs );
47 $maxId = $this->mID .
'-mode-max';
49 $this->mName .
'-mode',
51 [
'id' => $maxId,
'value' =>
'max' ] + $attribs
53 $html .=
"\u{00A0}" . Html::label( $this->
msg(
'maximum-size' )->text(), $maxId, $attribs );
55 $html .=
"\u{00A0}" . parent::getInputHTML( $value ? abs( $value ) :
'' );
56 $html .=
"\u{00A0}" . $this->
msg(
'pagesize' )->parse();
66 $this->mParent->getOutput()->addModuleStyles(
'mediawiki.widgets.SizeFilterWidget.styles' );
69 $value = $params[
'value'];
70 $params[
'value'] = $value ? abs( $value ) :
'';
73 'selectMin' => $this->mSelectMin,
74 'textinput' => $params,
75 'radioselectinput' => [
76 'name' => $this->mName .
'-mode',
77 'disabled' => !empty( $this->mParams[
'disabled'] ),
84 return [
'mediawiki.widgets.SizeFilterWidget' ];
93 $size = abs( $request->getInt( $this->mName, $this->getDefault() ) );
96 if ( $request->getRawVal( $this->mName .
'-mode' ) ===
'max' ) {
97 $this->mSelectMin =
false;
111class_alias( HTMLSizeFilterField::class,
'HTMLSizeFilterField' );