true, 'textinput' => [], 'radioselectinput' => [] ], $config ); $config['textinput'] = array_merge( [ 'type' => 'number' ], $config['textinput'] ); $config['radioselectinput'] = array_merge( [ 'options' => [ [ 'data' => 'min', 'label' => wfMessage( 'minimum-size' )->text() ], [ 'data' => 'max', 'label' => wfMessage( 'maximum-size' )->text() ] ] ], $config['radioselectinput'] ); // Parent constructor parent::__construct( $config ); // Properties $this->config = $config; $this->radioselectinput = new RadioSelectInputWidget( $config[ 'radioselectinput'] ); $this->textinput = new TextInputWidget( $config[ 'textinput' ] ); $this->label = new LabelWidget( [ 'label' => wfMessage( 'pagesize' )->text() ] ); // Initialization $this->radioselectinput->setValue( $config[ 'selectMin' ] ? 'min' : 'max' ); $this ->addClasses( [ 'mw-widget-sizeFilterWidget' ] ) ->appendContent( $this->radioselectinput, $this->textinput, $this->label ); } protected function getJavaScriptClassName() { return 'mw.widgets.SizeFilterWidget'; } public function getConfig( &$config ) { $config['textinput'] = $this->config['textinput']; $config['radioselectinput'] = $this->config['radioselectinput']; $config['selectMin'] = $this->config['selectMin']; return parent::getConfig( $config ); } }