* A select dropdown field. Basically a wrapper for Xmlselect class
*/
class HTMLSelectField extends HTMLFormField {
- function validate( $value, $alldata ) {
+ public function validate( $value, $alldata ) {
$p = parent::validate( $value, $alldata );
if ( $p !== true ) {
if ( in_array( strval( $value ), $validOptions, true ) ) {
return true;
} else {
- return $this->msg( 'htmlform-select-badoption' )->parse();
+ return $this->msg( 'htmlform-select-badoption' );
}
}
- function getInputHTML( $value ) {
+ public function getInputHTML( $value ) {
$select = new XmlSelect( $this->mName, $this->mID, strval( $value ) );
if ( !empty( $this->mParams['disabled'] ) ) {
return $select->getHTML();
}
- function getInputOOUI( $value ) {
+ public function getInputOOUI( $value ) {
$disabled = false;
$allowedParams = [ 'tabindex' ];
$attribs = OOUI\Element::configFromHtmlAttributes(