- $this->allValue = isset( $config['includeAllValue'] ) ? $config['includeAllValue'] : null;
- $this->namespace = new \OOUI\DropdownInputWidget( array(
- 'name' => $config['nameNamespace'],
- 'value' => $config['valueNamespace'],
- 'options' => $this->getNamespaceDropdownOptions( $config ),
- ) );
- if ( $config['nameAssociated'] !== null ) {
- // FIXME Should use a LabelWidget? But they don't work like HTML <label>s yet
- $this->associated = new \OOUI\FieldLayout(
- new \OOUI\CheckboxInputWidget( array(
- 'name' => $config['nameAssociated'],
- 'selected' => $config['valueAssociated'],
- 'value' => '1',
- ) ),
- array(
- 'align' => 'inline',
- 'label' => $config['labelAssociated'],
- )
- );
- }
- if ( $config['nameInvert'] !== null ) {
- $this->invert = new \OOUI\FieldLayout(
- new \OOUI\CheckboxInputWidget( array(
- 'name' => $config['nameInvert'],
- 'selected' => $config['valueInvert'],
- 'value' => '1',
- ) ),
- array(
- 'align' => 'inline',
- 'label' => $config['labelInvert'],
- )
- );
- }