Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1431025
IndicatorWidget.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
IndicatorWidget.php
View Options
<?php
namespace
OOUI
;
/**
* Indicator widget.
*
* See IndicatorElement for more information.
*/
class
IndicatorWidget
extends
Widget
{
use
IndicatorElement
;
use
TitledElement
;
use
LabelElement
;
/* Static Properties */
/** @var string */
public
static
$tagName
=
'span'
;
/**
* @param array $config Configuration options
*/
public
function
__construct
(
array
$config
=
[]
)
{
// Parent constructor
parent
::
__construct
(
$config
);
// Traits
$this
->
initializeIndicatorElement
(
array_merge
(
[
'indicatorElement'
=>
$this
],
$config
)
);
$this
->
initializeTitledElement
(
array_merge
(
[
'titled'
=>
$this
],
$config
)
);
$this
->
initializeLabelElement
(
array_merge
(
[
'labelElement'
=>
$this
,
'invisibleLabel'
=>
true
],
$config
)
);
// Initialization
$this
->
addClasses
(
[
'oo-ui-indicatorWidget'
]
);
// Remove class added by LabelElement initialization. It causes unexpected CSS to apply when
// nested in other widgets, because this widget used to not mix in LabelElement.
$this
->
removeClasses
(
[
'oo-ui-labelElement-label'
]
);
$this
->
registerConfigCallback
(
function
(
&
$config
)
{
// We have changed the default value, so change when it is outputted.
unset
(
$config
[
'invisibleLabel'
]
);
if
(
$this
->
invisibleLabel
!==
true
)
{
$config
[
'invisibleLabel'
]
=
$this
->
invisibleLabel
;
}
}
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 19:57 (3 h, 2 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
7d/57/b3a30ac794c5b94fa78a0758d18e
Default Alt Text
IndicatorWidget.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment