PHPSessionHandler: Implement SessionHandlerInterface
[mediawiki.git] / includes / htmlform / HTMLSelectNamespace.php
blob597c27a33712baad443c85af6f0b17eccb483847
1 <?php
2 /**
3 * Wrapper for Html::namespaceSelector to use in HTMLForm
4 */
5 class HTMLSelectNamespace extends HTMLFormField {
6 public function __construct( $params ) {
7 parent::__construct( $params );
9 $this->mAllValue = array_key_exists( 'all', $params )
10 ? $params['all']
11 : 'all';
15 function getInputHTML( $value ) {
16 return Html::namespaceSelector(
17 array(
18 'selected' => $value,
19 'all' => $this->mAllValue
20 ), array(
21 'name' => $this->mName,
22 'id' => $this->mID,
23 'class' => 'namespaceselector',
28 public function getInputOOUI( $value ) {
29 return new MediaWiki\Widget\NamespaceInputWidget( array(
30 'value' => $value,
31 'name' => $this->mName,
32 'id' => $this->mID,
33 'includeAllValue' => $this->mAllValue,
34 ) );