Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4147372
PlainEditBoxBuilder.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
744 B
Referenced Files
None
Subscribers
None
PlainEditBoxBuilder.php
View Options
<?php
namespace
MediaWiki\Extension\AbuseFilter\EditBox
;
use
MediaWiki\Html\Html
;
/**
* Class responsible for building a plain text filter edit box
*/
class
PlainEditBoxBuilder
extends
EditBoxBuilder
{
/**
* @inheritDoc
*/
public
function
getEditBox
(
string
$rules
,
bool
$isUserAllowed
,
bool
$externalForm
):
string
{
$rules
=
rtrim
(
$rules
)
.
"
\n
"
;
$editorAttribs
=
[
'name'
=>
'wpFilterRules'
,
'id'
=>
'wpFilterRules'
,
// Rules are in English
'dir'
=>
'ltr'
,
'cols'
=>
40
,
'rows'
=>
15
,
];
if
(
!
$isUserAllowed
)
{
$editorAttribs
[
'readonly'
]
=
'readonly'
;
}
if
(
$externalForm
)
{
$editorAttribs
[
'form'
]
=
'wpFilterForm'
;
}
return
Html
::
element
(
'textarea'
,
$editorAttribs
,
$rules
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 19 2026, 18:23 (6 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
30/07/824f76653e8fb77736772b079fc4
Default Alt Text
PlainEditBoxBuilder.php (744 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment