'tabindex' => 'tabIndex',
) );
- if ( isset( $attribs['readOnly'] ) ) {
- // This needs to be set to a boolean value
- $attribs['readOnly'] = true;
- }
-
$type = $this->getType( $attribs );
- return new OOUI\TextInputWidget( array(
+ return $this->getInputWidget( array(
'id' => $this->mID,
'name' => $this->mName,
'value' => $value,
'type' => $type,
) + $attribs );
}
+
+ protected function getInputWidget( $params ) {
+ return new OOUI\TextInputWidget( $params );
+ }
}