function getSpellCheck() {
$val = isset( $this->mParams['spellcheck'] ) ? $this->mParams['spellcheck'] : null;
- if( is_bool( $val ) ) {
+ if ( is_bool( $val ) ) {
// "spellcheck" attribute literally requires "true" or "false" to work.
return $val === true ? 'true' : 'false';
}
$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 );
+ }
}