mParams['size'] ) ? $this->mParams['size'] : 9; } function getInputHTML( $value ) { $attribs = []; if ( !empty( $this->mParams['disabled'] ) ) { $attribs['disabled'] = 'disabled'; } $html = Xml::radioLabel( $this->msg( 'minimum-size' )->text(), $this->mName . '-mode', 'min', $this->mID . '-mode-min', $value >= 0, $attribs ); $html .= ' ' . Xml::radioLabel( $this->msg( 'maximum-size' )->text(), $this->mName . '-mode', 'max', $this->mID . '-mode-max', $value < 0, $attribs ); $html .= ' ' . parent::getInputHTML( $value ? abs( $value ) : '' ); $html .= ' ' . $this->msg( 'pagesize' )->parse(); return $html; } // No OOUI yet function getInputOOUI( $value ) { return false; } /** * @param WebRequest $request * * @return string */ function loadDataFromRequest( $request ) { $size = $request->getInt( $this->mName ); if ( !$size ) { return $this->getDefault(); } $size = abs( $size ); // negative numbers represent "max", positive numbers represent "min" if ( $request->getVal( $this->mName . '-mode' ) === 'max' ) { return -$size; } else { return $size; } } protected function needsLabel() { return false; } }