X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fwidget%2FNamespaceInputWidget.php;h=7802a2a01757e6af6907b3c59b6f96b2d2edbed0;hb=0ae01716c36bd03192a6dc79816beee8a0a74fa5;hp=3e913b02ff706f6b02755c3d67b4a4ff23fb33fb;hpb=2ef178072f6f46abde7bdcc2630389a8b2837557;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/widget/NamespaceInputWidget.php b/includes/widget/NamespaceInputWidget.php index 3e913b02ff..7802a2a017 100644 --- a/includes/widget/NamespaceInputWidget.php +++ b/includes/widget/NamespaceInputWidget.php @@ -1,14 +1,12 @@ getNamespaceDropdownOptions( $config ); - // Parent constructor parent::__construct( $config ); // Properties - $this->includeAllValue = isset( $config['includeAllValue'] ) ? $config['includeAllValue'] : null; - $this->exclude = isset( $config['exclude'] ) ? $config['exclude'] : []; + $this->includeAllValue = $config['includeAllValue'] ?? null; + $this->exclude = $config['exclude'] ?? []; // Initialization $this->addClasses( [ 'mw-widget-namespaceInputWidget' ] ); @@ -37,8 +34,8 @@ class NamespaceInputWidget extends \OOUI\DropdownInputWidget { protected function getNamespaceDropdownOptions( array $config ) { $namespaceOptionsParams = [ - 'all' => isset( $config['includeAllValue'] ) ? $config['includeAllValue'] : null, - 'exclude' => isset( $config['exclude'] ) ? $config['exclude'] : null + 'all' => $config['includeAllValue'] ?? null, + 'exclude' => $config['exclude'] ?? null ]; $namespaceOptions = \Html::namespaceSelectorOptions( $namespaceOptionsParams ); @@ -61,6 +58,7 @@ class NamespaceInputWidget extends \OOUI\DropdownInputWidget { $config['includeAllValue'] = $this->includeAllValue; $config['exclude'] = $this->exclude; // Skip DropdownInputWidget's getConfig(), we don't need 'options' config + $config['dropdown']['$overlay'] = true; return \OOUI\InputWidget::getConfig( $config ); } }