Improve some parameter docs
[lhc/web/wiklou.git] / includes / widget / TitleInputWidget.php
index c262b40..aca9163 100644 (file)
@@ -20,19 +20,18 @@ class TitleInputWidget extends \OOUI\TextInputWidget {
 
        /**
         * @param array $config Configuration options
-        * @param int|null $config['namespace'] Namespace to prepend to queries
-        * @param bool|null $config['relative'] If a namespace is set,
-        *  return a title relative to it (default: true)
-        * @param bool|null $config['suggestions'] Display search suggestions (default: true)
-        * @param bool|null $config['highlightFirst'] Automatically highlight
-        *  the first result (default: true)
-        * @param bool|null $config['validateTitle'] Whether the input must
-        *  be a valid title (default: true)
+        *   - int|null $config['namespace'] Namespace to prepend to queries
+        *   - bool|null $config['relative'] If a namespace is set,
+        *     return a title relative to it (default: true)
+        *   - bool|null $config['suggestions'] Display search suggestions (default: true)
+        *   - bool|null $config['highlightFirst'] Automatically highlight
+        *     the first result (default: true)
+        *   - bool|null $config['validateTitle'] Whether the input must
+        *     be a valid title (default: true)
         */
-       public function __construct( array $config = array() ) {
-               // Parent constructor
+       public function __construct( array $config = [] ) {
                parent::__construct(
-                       array_merge( array( 'infusable' => true, 'maxLength' => 255 ), $config )
+                       array_merge( [ 'maxLength' => 255 ], $config )
                );
 
                // Properties, which are ignored in PHP and just shipped back to JS
@@ -53,7 +52,7 @@ class TitleInputWidget extends \OOUI\TextInputWidget {
                }
 
                // Initialization
-               $this->addClasses( array( 'mw-widget-titleInputWidget' ) );
+               $this->addClasses( [ 'mw-widget-titleInputWidget' ] );
        }
 
        protected function getJavaScriptClassName() {
@@ -76,6 +75,7 @@ class TitleInputWidget extends \OOUI\TextInputWidget {
                if ( $this->validateTitle !== null ) {
                        $config['validateTitle'] = $this->validateTitle;
                }
+               $config['$overlay'] = true;
                return parent::getConfig( $config );
        }
 }