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 )
14 public function getInputHTML( $value ) {
15 return Html
::namespaceSelector(
18 'all' => $this->mAllValue
20 'name' => $this->mName
,
22 'class' => 'namespaceselector',
27 public function getInputOOUI( $value ) {
28 return new MediaWiki\Widget\
NamespaceInputWidget( [
30 'name' => $this->mName
,
32 'includeAllValue' => $this->mAllValue
,
36 protected function getOOUIModules() {
37 // FIXME: NamespaceInputWidget should be in its own module (probably?)
38 return [ 'mediawiki.widgets' ];
41 protected function shouldInfuseOOUI() {