Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4162616
ToggleSwitchWidget.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
593 B
Referenced Files
None
Subscribers
None
ToggleSwitchWidget.php
View Options
<?php
namespace
MediaWiki\Widget
;
use
OOUI\CheckboxInputWidget
;
/**
* Base class for widgets to warp a checkbox into toggle widget.
*
* @copyright 2017 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license MIT
*/
class
ToggleSwitchWidget
extends
CheckboxInputWidget
{
public
function
__construct
(
array
$config
=
[]
)
{
parent
::
__construct
(
$config
);
$this
->
setValue
(
$config
[
'selected'
]
);
$this
->
addClasses
(
[
'mw-widgets-toggleSwitchWidget'
]
);
}
/** @inheritDoc */
protected
function
getJavaScriptClassName
()
{
return
'mw.widgets.ToggleSwitchWidget'
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 20 2026, 01:37 (10 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
90/3d/51268eb817e27bdacd0ff7995b1e
Default Alt Text
ToggleSwitchWidget.php (593 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment