5 use OOUI\MultilineTextInputWidget;
41 parent::__construct( $config );
44 $this->selectedArray = $config[
'default'] ?? [];
45 $this->inputName = $config[
'name'] ??
null;
46 $this->inputPlaceholder = $config[
'placeholder'] ??
null;
47 $this->input = $config[
'input'] ?? [];
48 $this->tagLimit = $config[
'tagLimit'] ??
null;
49 $this->allowArbitrary = $config[
'allowArbitrary'] ??
false;
50 $this->allowedValues = $config[
'allowedValues'] ??
null;
52 $textarea =
new MultilineTextInputWidget( array_merge( [
53 'name' => $this->inputName,
54 'value' => implode(
"\n", $this->selectedArray ),
55 'rows' => min( $this->tagLimit, 10 ) ?? 10,
57 'mw-widgets-tagMultiselectWidget-multilineTextInputWidget'
63 $this->appendContent( $textarea, $pending );
64 $this->addClasses( [
'mw-widgets-tagMultiselectWidget' ] );
68 if ( $this->selectedArray !==
null ) {
71 if ( $this->inputName !==
null ) {
74 if ( $this->inputPlaceholder !==
null ) {
77 if ( $this->input !==
null ) {
80 if ( $this->tagLimit !==
null ) {
83 if ( $this->allowArbitrary !==
null ) {
86 if ( $this->allowedValues !==
null ) {
90 $config[
'$overlay'] =
true;
91 return parent::getConfig( $config );
95 return 'mw.widgets.TagMultiselectWidget';
Text input widget that displays pending animation.