Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5966920
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\User\UserIdentity
;
use
Skin
;
class
VisualEditorHookRunner
implements
VisualEditorApiVisualEditorEditPreSaveHook
,
VisualEditorApiVisualEditorEditPostSaveHook
,
VisualEditorBeforeEditorHook
{
private
HookContainer
$hookContainer
;
public
function
__construct
(
HookContainer
$hookContainer
)
{
$this
->
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
Sat, Oct 3, 12:00 (3 d, 15 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
48/b1/9656ba4272c30f7e60b23cfd0812
Default Alt Text
VisualEditorHookRunner.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment