MediaWiki master
HTMLTextFieldWithButton.php
Go to the documentation of this file.
1<?php
2
4
6
14 protected $mClassWithButton = null;
15
20 public function __construct( $info ) {
21 $this->mClassWithButton = new HTMLFormFieldWithButton( $info );
22 parent::__construct( $info );
23 }
24
26 public function getInputHTML( $value ) {
27 return $this->mClassWithButton->getElement( parent::getInputHTML( $value ) );
28 }
29
31 protected function getFieldLayoutOOUI( $inputField, $config ) {
32 $buttonWidget = $this->mClassWithButton->getInputOOUI( '' );
33 return new HTMLFormActionFieldLayout( $inputField, $buttonWidget, $config );
34 }
35}
36
38class_alias( HTMLTextFieldWithButton::class, 'HTMLTextFieldWithButton' );
Enables HTMLFormField elements to be build with a button.
Creates a text input field with a button assigned to the input field.
getInputHTML( $value)
This function must be implemented to return the HTML to generate the input object itself....
getFieldLayoutOOUI( $inputField, $config)
Get a FieldLayout (or subclass thereof) to wrap this field in when using OOUI output....