MediaWiki
master
Toggle main menu visibility
UserInputWidget.php
Go to the documentation of this file.
1
<?php
2
3
namespace
MediaWiki\Widget;
4
5
use OOUI\TextInputWidget;
6
13
class
UserInputWidget
extends
TextInputWidget {
15
protected
$excludeNamed
;
16
18
protected
$excludeTemp
;
19
23
public
function
__construct
( array $config = [] ) {
24
parent::__construct( $config );
25
26
if
( isset( $config[
'excludenamed'
] ) ) {
27
$this->excludeNamed = $config[
'excludenamed'
];
28
}
29
30
if
( isset( $config[
'excludetemp'
] ) ) {
31
$this->excludeTemp = $config[
'excludetemp'
];
32
}
33
34
// Initialization
35
$this->addClasses( [
'mw-widget-userInputWidget'
] );
36
}
37
39
protected
function
getJavaScriptClassName
() {
40
return
'mw.widgets.UserInputWidget'
;
41
}
42
44
public
function
getConfig
( &$config ) {
45
$config[
'$overlay'
] =
true
;
46
47
if
( $this->excludeNamed !==
null
) {
48
$config[
'excludenamed'
] =
$this->excludeNamed
;
49
}
50
51
if
( $this->excludeTemp !==
null
) {
52
$config[
'excludetemp'
] =
$this->excludeTemp
;
53
}
54
55
return
parent::getConfig( $config );
56
}
57
}
MediaWiki\Widget\UserInputWidget
User input widget.
Definition
UserInputWidget.php:13
MediaWiki\Widget\UserInputWidget\getConfig
getConfig(&$config)
Definition
UserInputWidget.php:44
MediaWiki\Widget\UserInputWidget\$excludeTemp
bool $excludeTemp
Definition
UserInputWidget.php:18
MediaWiki\Widget\UserInputWidget\__construct
__construct(array $config=[])
Definition
UserInputWidget.php:23
MediaWiki\Widget\UserInputWidget\getJavaScriptClassName
getJavaScriptClassName()
Definition
UserInputWidget.php:39
MediaWiki\Widget\UserInputWidget\$excludeNamed
bool $excludeNamed
Definition
UserInputWidget.php:15
includes
Widget
UserInputWidget.php
Generated on
for MediaWiki by
1.18.0