Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5979826
LabelIconWidget.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
LabelIconWidget.php
View Options
<?php
namespace
MediaWiki\Extension\Notifications\OOUI
;
use
OOUI\IconElement
;
use
OOUI\LabelElement
;
use
OOUI\Tag
;
use
OOUI\TitledElement
;
use
OOUI\Widget
;
/**
* Widget combining a label and icon
*/
class
LabelIconWidget
extends
Widget
{
use
IconElement
;
use
LabelElement
;
use
TitledElement
;
/**
* @param array $config Configuration options
* - string|HtmlSnippet $config['label'] Label text
* - string $config['title'] Title text
* - string $config['icon'] Icon key
*/
public
function
__construct
(
$config
)
{
parent
::
__construct
(
$config
);
$tableRow
=
new
Tag
(
'div'
);
$tableRow
->
setAttributes
(
[
'class'
=>
'oo-ui-labelIconWidget-row'
,
]
);
$icon
=
new
Tag
(
'div'
);
$label
=
new
Tag
(
'div'
);
$this
->
initializeIconElement
(
array_merge
(
$config
,
[
'iconElement'
=>
$icon
]
)
);
$this
->
initializeLabelElement
(
array_merge
(
$config
,
[
'labelElement'
=>
$label
]
)
);
$this
->
initializeTitledElement
(
$config
);
$this
->
addClasses
(
[
'oo-ui-labelIconWidget'
]
);
$tableRow
->
appendContent
(
$icon
,
$label
);
$this
->
appendContent
(
$tableRow
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 21:06 (5 d, 14 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
51/6c/09736a443d248294c6c1f701db23
Default Alt Text
LabelIconWidget.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment