MediaWiki REL1_33
HTMLSelectNamespace.php
Go to the documentation of this file.
1<?php
6
8 protected $mAllValue;
9
10 public function __construct( $params ) {
11 parent::__construct( $params );
12
13 $this->mAllValue = array_key_exists( 'all', $params )
14 ? $params['all']
15 : 'all';
16 }
17
18 public function getInputHTML( $value ) {
19 return Html::namespaceSelector(
20 [
21 'selected' => $value,
22 'all' => $this->mAllValue
23 ], [
24 'name' => $this->mName,
25 'id' => $this->mID,
26 'class' => 'namespaceselector',
27 ]
28 );
29 }
30
31 public function getInputOOUI( $value ) {
33 'value' => $value,
34 'name' => $this->mName,
35 'id' => $this->mID,
36 'includeAllValue' => $this->mAllValue,
37 ] );
38 }
39
40 protected function getOOUIModules() {
41 // FIXME: NamespaceInputWidget should be in its own module (probably?)
42 return [ 'mediawiki.widgets' ];
43 }
44
45 protected function shouldInfuseOOUI() {
46 return true;
47 }
48}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
The parent class to generate form fields.
Wrapper for Html::namespaceSelector to use in HTMLForm.
getInputOOUI( $value)
Same as getInputHTML, but returns an OOUI object.
shouldInfuseOOUI()
Whether the field should be automatically infused.
getOOUIModules()
Get the list of extra ResourceLoader modules which must be loaded client-side before it's possible to...
__construct( $params)
Initialise the object.
getInputHTML( $value)
This function must be implemented to return the HTML to generate the input object itself.
$params