MediaWiki
REL1_34
EditAction.php
Go to the documentation of this file.
1
<?php
28
class
EditAction
extends
FormlessAction
{
29
30
public
function
getName
() {
31
return
'edit'
;
32
}
33
34
public
function
onView
() {
35
return
null
;
36
}
37
38
public
function
show
() {
39
$this->
useTransactionalTimeLimit
();
40
41
$out = $this->
getOutput
();
42
$out->setRobotPolicy(
'noindex,nofollow'
);
43
if
( $this->
getContext
()->getConfig()->
get
(
'UseMediaWikiUIEverywhere'
) ) {
44
$out->addModuleStyles( [
45
'mediawiki.ui.input'
,
46
'mediawiki.ui.checkbox'
,
47
] );
48
}
49
$page
=
$this->page
;
50
$user = $this->
getUser
();
51
52
if
( Hooks::run(
'CustomEditor'
, [
$page
, $user ] ) ) {
53
$editor =
new
EditPage
(
$page
);
54
$editor->setContextTitle( $this->
getTitle
() );
55
$editor->edit();
56
}
57
}
58
59
public
function
doesWrites
() {
60
return
true
;
61
}
62
}
Action\$page
$page
Page on which we're performing the action.
Definition
Action.php:46
Action\getTitle
getTitle()
Shortcut to get the Title object from the page.
Definition
Action.php:247
Action\getContext
getContext()
Get the IContextSource in use here.
Definition
Action.php:179
Action\getOutput
getOutput()
Get the OutputPage being used for this instance.
Definition
Action.php:208
Action\getUser
getUser()
Shortcut to get the User being used for this instance.
Definition
Action.php:218
Action\useTransactionalTimeLimit
useTransactionalTimeLimit()
Call wfTransactionalTimeLimit() if this request was POSTed.
Definition
Action.php:422
EditAction
Page edition handler (action=edit)
Definition
EditAction.php:28
EditAction\getName
getName()
Return the name of the action this object responds to.
Definition
EditAction.php:30
EditAction\doesWrites
doesWrites()
Indicates whether this action may perform database writes.
Definition
EditAction.php:59
EditAction\show
show()
The main action entry point.
Definition
EditAction.php:38
EditAction\onView
onView()
Show something on GET request.
Definition
EditAction.php:34
EditPage
The edit page/HTML interface (split from Article) The actual database and text munging is still in Ar...
Definition
EditPage.php:46
FormlessAction
An action which just does something, without showing a form first.
Definition
FormlessAction.php:28
includes
actions
EditAction.php
Generated on Mon Nov 25 2024 16:04:46 for MediaWiki by
1.10.0