MediaWiki REL1_34
EditAction.php
Go to the documentation of this file.
1<?php
29
30 public function getName() {
31 return 'edit';
32 }
33
34 public function onView() {
35 return null;
36 }
37
38 public function show() {
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 }
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}
$page
Page on which we're performing the action.
Definition Action.php:46
getTitle()
Shortcut to get the Title object from the page.
Definition Action.php:247
getContext()
Get the IContextSource in use here.
Definition Action.php:179
getOutput()
Get the OutputPage being used for this instance.
Definition Action.php:208
getUser()
Shortcut to get the User being used for this instance.
Definition Action.php:218
useTransactionalTimeLimit()
Call wfTransactionalTimeLimit() if this request was POSTed.
Definition Action.php:422
Page edition handler (action=edit)
getName()
Return the name of the action this object responds to.
doesWrites()
Indicates whether this action may perform database writes.
show()
The main action entry point.
onView()
Show something on GET request.
The edit page/HTML interface (split from Article) The actual database and text munging is still in Ar...
Definition EditPage.php:46
An action which just does something, without showing a form first.