MediaWiki
1.42.0
ToggleSwitchWidget.php
Go to the documentation of this file.
1
<?php
2
3
namespace
MediaWiki\Widget
;
4
5
use OOUI\CheckboxInputWidget;
6
13
class
ToggleSwitchWidget
extends
CheckboxInputWidget {
14
15
public
function
__construct
( array $config = [] ) {
16
parent::__construct( $config );
17
18
$this->setValue( $config[
'selected'
] );
19
$this->addClasses( [
'mw-widgets-toggleSwitchWidget'
] );
20
}
21
22
protected
function
getJavaScriptClassName
() {
23
return
'mw.widgets.ToggleSwitchWidget'
;
24
}
25
}
MediaWiki\Widget\ToggleSwitchWidget
Base class for widgets to warp a checkbox into toggle widget.
Definition
ToggleSwitchWidget.php:13
MediaWiki\Widget\ToggleSwitchWidget\getJavaScriptClassName
getJavaScriptClassName()
Definition
ToggleSwitchWidget.php:22
MediaWiki\Widget\ToggleSwitchWidget\__construct
__construct(array $config=[])
Definition
ToggleSwitchWidget.php:15
MediaWiki\Widget
Definition
CheckMatrixWidget.php:3
includes
widget
ToggleSwitchWidget.php
Generated on Thu Jun 13 2024 13:50:33 for MediaWiki by
1.10.0