3 * Wrapper for Html::namespaceSelector to use in HTMLForm
5 class HTMLSelectNamespace
extends HTMLFormField
{
6 public function __construct( $params ) {
7 parent
::__construct( $params );
9 $this->mAllValue
= array_key_exists( 'all', $params )
15 function getInputHTML( $value ) {
16 return Html
::namespaceSelector(
19 'all' => $this->mAllValue
21 'name' => $this->mName
,
23 'class' => 'namespaceselector',
28 public function getInputOOUI( $value ) {
29 return new MediaWiki\Widget\
NamespaceInputWidget( [
31 'name' => $this->mName
,
33 'includeAllValue' => $this->mAllValue
,
37 protected function getOOUIModules() {
38 // FIXME: NamespaceInputWidget should be in its own module (probably?)
39 return [ 'mediawiki.widgets' ];
42 protected function shouldInfuseOOUI() {