}
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 );
$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(
+ $attribs += $this->getAttributes( $allowedParams, [
'tabindex' => 'tabIndex',
'readonly' => 'readOnly',
- ) );
+ ] );
- if ( isset( $attribs['readOnly'] ) ) {
- // this needs to be set to a boolean value - hack??
- $attribs['readOnly'] = true;
- }
-
- return new OOUI\TextInputWidget( array(
+ return new OOUI\TextInputWidget( [
'id' => $this->mID,
'name' => $this->mName,
'multiline' => true,
'value' => $value,
'rows' => $this->getRows(),
- ) + $attribs );
+ ] + $attribs );
}
}