Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7471549
VisualEditorHookRunner.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
VisualEditorHookRunner.php
View Options
<?php
namespace
MediaWiki\Extension\VisualEditor
;
/**
* VisualEditorHookRunner
*
* @file
* @ingroup Extensions
* @copyright 2011-2021 VisualEditor Team and others; see AUTHORS.txt
* @license MIT
*/
use
MediaWiki\HookContainer\HookContainer
;
use
MediaWiki\Output\OutputPage
;
use
MediaWiki\Page\ProperPageIdentity
;
use
MediaWiki\Skin\Skin
;
use
MediaWiki\User\UserIdentity
;
class
VisualEditorHookRunner
implements
VisualEditorApiVisualEditorEditPreSaveHook
,
VisualEditorApiVisualEditorEditPostSaveHook
,
VisualEditorBeforeEditorHook
{
public
function
__construct
(
private
readonly
HookContainer
$hookContainer
)
{
}
/** @inheritDoc */
public
function
onVisualEditorApiVisualEditorEditPreSave
(
ProperPageIdentity
$page
,
UserIdentity
$user
,
string
$wikitext
,
array
&
$params
,
array
$pluginData
,
array
&
$apiResponse
)
{
return
$this
->
hookContainer
->
run
(
'VisualEditorApiVisualEditorEditPreSave'
,
[
$page
,
$user
,
$wikitext
,
&
$params
,
$pluginData
,
&
$apiResponse
],
[
'abortable'
=>
true
]
);
}
/** @inheritDoc */
public
function
onVisualEditorApiVisualEditorEditPostSave
(
ProperPageIdentity
$page
,
UserIdentity
$user
,
string
$wikitext
,
array
$params
,
array
$pluginData
,
array
$saveResult
,
array
&
$apiResponse
):
void
{
$this
->
hookContainer
->
run
(
'VisualEditorApiVisualEditorEditPostSave'
,
[
$page
,
$user
,
$wikitext
,
$params
,
$pluginData
,
$saveResult
,
&
$apiResponse
],
[
'abortable'
=>
false
]
);
}
/** @inheritDoc */
public
function
onVisualEditorBeforeEditor
(
OutputPage
$output
,
Skin
$skin
):
bool
{
return
$this
->
hookContainer
->
run
(
'VisualEditorBeforeEditor'
,
[
$output
,
$skin
],
[
'abortable'
=>
true
]
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 23, 08:09 (3 d, 23 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
d4/5c/c4c714e7ffc7b5812f0bc663d2b2
Default Alt Text
VisualEditorHookRunner.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment