Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4128457
MultilineTextInputWidget.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1023 B
Referenced Files
None
Subscribers
None
MultilineTextInputWidget.php
View Options
<?php
namespace
OOUI
;
/**
* Input widget with a text field.
*/
class
MultilineTextInputWidget
extends
TextInputWidget
{
/**
* Allow multiple lines of text.
*
* @var bool
*/
protected
$multiline
=
true
;
/**
* @param array $config Configuration options
* - int $config['rows'] Number of visible lines in textarea.
*/
public
function
__construct
(
array
$config
=
[]
)
{
// Config initialization
$config
=
array_merge
(
[
'readOnly'
=>
false
,
'autofocus'
=>
false
,
'required'
=>
false
,
],
$config
);
// Parent constructor
parent
::
__construct
(
$config
);
if
(
$config
[
'rows'
]
??
null
)
{
$this
->
input
->
setAttributes
(
[
'rows'
=>
$config
[
'rows'
]
]
);
}
}
/** @inheritDoc */
protected
function
getInputElement
(
$config
)
{
return
new
Tag
(
'textarea'
);
}
/** @inheritDoc */
public
function
getConfig
(
&
$config
)
{
$rows
=
$this
->
input
->
getAttribute
(
'rows'
);
if
(
$rows
!==
null
)
{
$config
[
'rows'
]
=
$rows
;
}
return
parent
::
getConfig
(
$config
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Aug 19, 09:16 (2 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
02/b8/09d1c8ef9f7d0f345e0ef9e9c935
Default Alt Text
MultilineTextInputWidget.php (1023 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment