Merge "Http::getProxy() method to get proxy configuration"
[lhc/web/wiklou.git] / includes / htmlform / HTMLTextAreaField.php
index aeb4b7c..973f1cb 100644 (file)
@@ -22,25 +22,25 @@ class HTMLTextAreaField extends HTMLFormField {
        }
 
        function getInputHTML( $value ) {
-               $attribs = array(
+               $attribs = [
                                'id' => $this->mID,
                                'cols' => $this->getCols(),
                                'rows' => $this->getRows(),
                                'spellcheck' => $this->getSpellCheck(),
-                       ) + $this->getTooltipAndAccessKey();
+                       ] + $this->getTooltipAndAccessKey();
 
                if ( $this->mClass !== '' ) {
                        $attribs['class'] = $this->mClass;
                }
 
-               $allowedParams = array(
+               $allowedParams = [
                        'placeholder',
                        'tabindex',
                        'disabled',
                        'readonly',
                        'required',
                        'autofocus'
-               );
+               ];
 
                $attribs += $this->getAttributes( $allowedParams );
                return Html::textarea( $this->mName, $value, $attribs );
@@ -54,29 +54,28 @@ class HTMLTextAreaField extends HTMLFormField {
                $attribs = $this->getTooltipAndAccessKey();
 
                if ( $this->mClass !== '' ) {
-                       $attribs['classes'] = array( $this->mClass );
+                       $attribs['classes'] = [ $this->mClass ];
                }
 
-               $allowedParams = array(
+               $allowedParams = [
                        'placeholder',
                        'tabindex',
                        'disabled',
                        'readonly',
                        'required',
                        'autofocus',
-               );
+               ];
 
-               $attribs += $this->getAttributes( $allowedParams, array(
-                       'tabindex' => 'tabIndex',
-                       'readonly' => 'readOnly',
-               ) );
+               $attribs += OOUI\Element::configFromHtmlAttributes(
+                       $this->getAttributes( $allowedParams )
+               );
 
-               return new OOUI\TextInputWidget( array(
+               return new OOUI\TextInputWidget( [
                        'id' => $this->mID,
                        'name' => $this->mName,
                        'multiline' => true,
                        'value' => $value,
                        'rows' => $this->getRows(),
-               ) + $attribs );
+               ] + $attribs );
        }
 }