Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4112012
TabSelectWidget.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
TabSelectWidget.php
View Options
<?php
namespace
OOUI
;
/**
* TabSelectWidget is a list that contains TabOptionWidget options
*/
class
TabSelectWidget
extends
SelectWidget
{
use
TabIndexedElement
;
/** @var bool */
protected
$framed
;
/**
* @param array $config Configuration options
* - bool $config['framed'] Use framed tabs (default: true)
*/
public
function
__construct
(
array
$config
=
[]
)
{
parent
::
__construct
(
$config
);
$this
->
initializeTabIndexedElement
(
array_merge
(
$config
,
[
'tabIndexed'
=>
$this
]
)
);
$this
->
addClasses
(
[
'oo-ui-tabSelectWidget'
]
);
$this
->
toggleFramed
(
$config
[
'framed'
]
??
true
);
$this
->
setAttributes
(
[
'role'
=>
'tablist'
]
);
}
/**
* Check if tabs are framed.
*
* @return bool Tabs are framed
*/
public
function
isFramed
()
{
return
$this
->
framed
;
}
/**
* Render the tabs with or without frames.
*
* @param bool|null $framed Make tabs framed, omit to toggle
* @return $this
*/
public
function
toggleFramed
(
$framed
=
null
)
{
$this
->
framed
=
$framed
!==
null
?
(
bool
)
$framed
:
!
$this
->
framed
;
$this
->
toggleClasses
(
[
'oo-ui-tabSelectWidget-framed'
],
$this
->
framed
);
$this
->
toggleClasses
(
[
'oo-ui-tabSelectWidget-frameless'
],
!
$this
->
framed
);
return
$this
;
}
/** @inheritDoc */
public
function
getConfig
(
&
$config
)
{
if
(
$this
->
framed
!==
true
)
{
$config
[
'framed'
]
=
$this
->
framed
;
}
return
parent
::
getConfig
(
$config
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Aug 18, 22:39 (6 h, 19 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
0b/84/1c345c89baec052237d2b9c5dacf
Default Alt Text
TabSelectWidget.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment