Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6114419
EditorCapability.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
EditorCapability.php
View Options
<?php
namespace
MediaWiki\Extension\AbuseFilter\BlockedDomains
;
use
LogicException
;
use
MediaWiki\Context\IContextSource
;
use
MediaWiki\Extension\CommunityConfiguration\EditorCapabilities\AbstractEditorCapability
;
use
MediaWiki\Extension\CommunityConfiguration\Provider\IConfigurationProvider
;
use
MediaWiki\Linker\LinkRenderer
;
use
MediaWiki\Title\Title
;
use
Wikimedia\ObjectCache\WANObjectCache
;
class
EditorCapability
extends
AbstractEditorCapability
{
private
WANObjectCache
$wanCache
;
private
LinkRenderer
$linkRenderer
;
private
BlockedDomainValidator
$blockedDomainValidator
;
public
function
__construct
(
IContextSource
$ctx
,
Title
$parentTitle
,
WANObjectCache
$wanCache
,
LinkRenderer
$linkRenderer
,
BlockedDomainValidator
$blockedDomainValidator
)
{
parent
::
__construct
(
$ctx
,
$parentTitle
);
$this
->
wanCache
=
$wanCache
;
$this
->
linkRenderer
=
$linkRenderer
;
$this
->
blockedDomainValidator
=
$blockedDomainValidator
;
}
/**
* @inheritDoc
*/
public
function
execute
(
?
IConfigurationProvider
$provider
,
?
string
$subpage
=
null
):
void
{
if
(
!
$provider
instanceof
BlockedDomainConfigProvider
)
{
throw
new
LogicException
(
__CLASS__
.
' received unsupported provider'
);
}
$this
->
getContext
()->
getOutput
()->
addSubtitle
(
'< '
.
$this
->
linkRenderer
->
makeLink
(
$this
->
getParentTitle
()
)
);
$editor
=
new
BlockedDomainEditor
(
$this
->
getContext
(),
$this
->
getParentTitle
()->
getSubpage
(
$provider
->
getId
()
),
$this
->
wanCache
,
$this
->
linkRenderer
,
$provider
,
$this
->
blockedDomainValidator
);
$editor
->
execute
(
$subpage
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 6 2026, 22:40 (6 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
39/3d/103df6cb4b00e395fe9b264c9832
Default Alt Text
EditorCapability.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment