MediaWiki master
HTMLSelectNamespaceWithButton.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
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
36class_alias( HTMLSelectNamespaceWithButton::class, 'HTMLSelectNamespaceWithButton' );
Enables HTMLFormField elements to be build with a button.
Creates a Html::namespaceSelector input field with a button assigned to the input field.
getFieldLayoutOOUI( $inputField, $config)
Get a FieldLayout (or subclass thereof) to wrap this field in when using OOUI output.
getInputHTML( $value)
This function must be implemented to return the HTML to generate the input object itself....
Wrapper for Html::namespaceSelector to use in HTMLForm.