3 * Wrapper for Html::namespaceSelector to use in HTMLForm
5 class HTMLSelectNamespace
extends HTMLFormField
{
6 public function __construct( $params ) {
7 parent
::__construct( $params );
8 $this->mAllValue
= isset( $this->mParams
['all'] ) ?
$this->mParams
['all'] : 'all';
11 function getInputHTML( $value ) {
12 return Html
::namespaceSelector(
15 'all' => $this->mAllValue
17 'name' => $this->mName
,
19 'class' => 'namespaceselector',
24 public function getInputOOUI( $value ) {
25 $namespaceOptions = Html
::namespaceSelectorOptions( array( 'all' => $this->mAllValue
) );
28 foreach( $namespaceOptions as $id => $name ) {
30 'data' => (string)$id,
35 return new OOUI\
DropdownInputWidget( array(
36 'options' => $options,
38 'name' => $this->mName
,