It looks like there is something missing after the last statement Also remove some other empty lines at begin of functions, ifs or loops while at these files Change-Id: Ib00b5cfd31ca4dcd0c32ce33754d3c80bae70641
44 lines
970 B
PHP
44 lines
970 B
PHP
<?php
|
|
/**
|
|
* Wrapper for Html::namespaceSelector to use in HTMLForm
|
|
*/
|
|
class HTMLSelectNamespace extends HTMLFormField {
|
|
public function __construct( $params ) {
|
|
parent::__construct( $params );
|
|
|
|
$this->mAllValue = array_key_exists( 'all', $params )
|
|
? $params['all']
|
|
: 'all';
|
|
}
|
|
|
|
public function getInputHTML( $value ) {
|
|
return Html::namespaceSelector(
|
|
[
|
|
'selected' => $value,
|
|
'all' => $this->mAllValue
|
|
], [
|
|
'name' => $this->mName,
|
|
'id' => $this->mID,
|
|
'class' => 'namespaceselector',
|
|
]
|
|
);
|
|
}
|
|
|
|
public function getInputOOUI( $value ) {
|
|
return new MediaWiki\Widget\NamespaceInputWidget( [
|
|
'value' => $value,
|
|
'name' => $this->mName,
|
|
'id' => $this->mID,
|
|
'includeAllValue' => $this->mAllValue,
|
|
] );
|
|
}
|
|
|
|
protected function getOOUIModules() {
|
|
// FIXME: NamespaceInputWidget should be in its own module (probably?)
|
|
return [ 'mediawiki.widgets' ];
|
|
}
|
|
|
|
protected function shouldInfuseOOUI() {
|
|
return true;
|
|
}
|
|
}
|