Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5989126
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
{
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
Sun, Oct 4, 01:01 (3 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
79/29/ff5de0afb6be9f5b5a1f025f67c1
Default Alt Text
VisualEditorHookRunner.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment