21 return $this->mParams[
'size'] ?? 9;
26 if ( !empty( $this->mParams[
'disabled'] ) ) {
27 $attribs[
'disabled'] =
'disabled';
31 $this->
msg(
'minimum-size' )->text(),
32 $this->mName .
'-mode',
34 $this->mID .
'-mode-min',
39 $this->
msg(
'maximum-size' )->text(),
40 $this->mName .
'-mode',
42 $this->mID .
'-mode-max',
46 $html .=
"\u{00A0}" . parent::getInputHTML( $value ? abs( $value ) :
'' );
47 $html .=
"\u{00A0}" . $this->
msg(
'pagesize' )->parse();
57 $this->mParent->getOutput()->addModuleStyles(
'mediawiki.widgets.SizeFilterWidget.styles' );
60 $value = $params[
'value'];
61 $params[
'value'] = $value ? abs( $value ) :
'';
64 'selectMin' => $this->mSelectMin,
65 'textinput' => $params,
66 'radioselectinput' => [
67 'name' => $this->mName .
'-mode',
68 'disabled' => !empty( $this->mParams[
'disabled'] ),
74 return [
'mediawiki.widgets.SizeFilterWidget' ];
83 $size = abs( $request->getInt( $this->mName, $this->getDefault() ) );
86 if ( $request->getVal( $this->mName .
'-mode' ) ===
'max' ) {
87 $this->mSelectMin =
false;
A field that must contain a number.
A size filter field for use on query-type special pages.
getInputHTML( $value)
This function must be implemented to return the HTML to generate the input object itself....
needsLabel()
Should this field have a label, or is there no input element with the appropriate id for the label to...
getInputWidget( $params)
Stability: stableto overrideWidgetStability: stableto override
loadDataFromRequest( $request)
getOOUIModules()
Get the list of extra ResourceLoader modules which must be loaded client-side before it's possible to...
static radioLabel( $label, $name, $value, $id, $checked=false, $attribs=[])
Convenience function to build an HTML radio button with a label.