MediaWiki
master
HTMLTextFieldWithButton.php
Go to the documentation of this file.
1
<?php
2
3
namespace
MediaWiki\HTMLForm\Field
;
4
5
use
MediaWiki\HTMLForm\HTMLFormActionFieldLayout
;
6
12
class
HTMLTextFieldWithButton
extends
HTMLTextField
{
14
protected
$mClassWithButton
=
null
;
15
20
public
function
__construct
( $info ) {
21
$this->mClassWithButton =
new
HTMLFormFieldWithButton
( $info );
22
parent::__construct( $info );
23
}
24
25
public
function
getInputHTML
( $value ) {
26
return
$this->mClassWithButton->getElement( parent::getInputHTML( $value ) );
27
}
28
29
protected
function
getFieldLayoutOOUI
( $inputField, $config ) {
30
$buttonWidget = $this->mClassWithButton->getInputOOUI(
''
);
31
return
new
HTMLFormActionFieldLayout
( $inputField, $buttonWidget, $config );
32
}
33
}
34
36
class_alias( HTMLTextFieldWithButton::class,
'HTMLTextFieldWithButton'
);
MediaWiki\HTMLForm\Field\HTMLFormFieldWithButton
Enables HTMLFormField elements to be build with a button.
Definition
HTMLFormFieldWithButton.php:15
MediaWiki\HTMLForm\Field\HTMLTextFieldWithButton
Creates a text input field with a button assigned to the input field.
Definition
HTMLTextFieldWithButton.php:12
MediaWiki\HTMLForm\Field\HTMLTextFieldWithButton\__construct
__construct( $info)
Definition
HTMLTextFieldWithButton.php:20
MediaWiki\HTMLForm\Field\HTMLTextFieldWithButton\$mClassWithButton
HTMLFormFieldWithButton $mClassWithButton
Definition
HTMLTextFieldWithButton.php:14
MediaWiki\HTMLForm\Field\HTMLTextFieldWithButton\getInputHTML
getInputHTML( $value)
This function must be implemented to return the HTML to generate the input object itself....
Definition
HTMLTextFieldWithButton.php:25
MediaWiki\HTMLForm\Field\HTMLTextFieldWithButton\getFieldLayoutOOUI
getFieldLayoutOOUI( $inputField, $config)
Get a FieldLayout (or subclass thereof) to wrap this field in when using OOUI output.
Definition
HTMLTextFieldWithButton.php:29
MediaWiki\HTMLForm\Field\HTMLTextField
<input> field.
Definition
HTMLTextField.php:19
MediaWiki\HTMLForm\HTMLFormActionFieldLayout
Definition
HTMLFormActionFieldLayout.php:8
MediaWiki\HTMLForm\Field
Definition
HTMLApiField.php:3
includes
htmlform
fields
HTMLTextFieldWithButton.php
Generated on Fri Nov 8 2024 04:24:19 for MediaWiki by
1.10.0