Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1431275
FormLayout.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
FormLayout.php
View Options
<?php
namespace
OOUI
;
/**
* Layout with an HTML form.
*/
class
FormLayout
extends
Layout
{
use
GroupElement
;
/* Static Properties */
/** @var string */
public
static
$tagName
=
'form'
;
/**
* @param array $config Configuration options
* - string $config['method'] HTML form `method` attribute
* - string $config['action'] HTML form `action` attribute
* - string $config['enctype'] HTML form `enctype` attribute
* - FieldsetLayout[] $config['items'] Items to add
*/
public
function
__construct
(
array
$config
=
[]
)
{
// Parent constructor
parent
::
__construct
(
$config
);
// Traits
$this
->
initializeGroupElement
(
array_merge
(
[
'group'
=>
$this
],
$config
)
);
// Initialization
$attributeAllowList
=
[
'method'
,
'action'
,
'enctype'
];
$this
->
addClasses
(
[
'oo-ui-formLayout'
]
)
->
setAttributes
(
array_intersect_key
(
$config
,
array_flip
(
$attributeAllowList
)
)
);
if
(
isset
(
$config
[
'items'
]
)
)
{
$this
->
addItems
(
$config
[
'items'
]
);
}
}
/** @inheritDoc */
public
function
getConfig
(
&
$config
)
{
foreach
(
[
'method'
,
'action'
,
'enctype'
]
as
$attr
)
{
$value
=
$this
->
getAttribute
(
$attr
);
if
(
$value
!==
null
)
{
$config
[
$attr
]
=
$value
;
}
}
return
parent
::
getConfig
(
$config
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 20:15 (22 h, 55 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
02/3a/7b2600a066a210eb97367e4bca0b
Default Alt Text
FormLayout.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment