Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5967403
ToggleSwitchWidget.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
573 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'
]
);
}
protected
function
getJavaScriptClassName
()
{
return
'mw.widgets.ToggleSwitchWidget'
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 12:22 (3 d, 3 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
06/1a/461274c4247c88d94f2a94559990
Default Alt Text
ToggleSwitchWidget.php (573 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment