MediaWiki master
EditAction.php
Go to the documentation of this file.
1<?php
22
32
37 public function getName() {
38 return 'edit';
39 }
40
45 public function onView() {
46 return null;
47 }
48
52 public function show() {
54
55 $out = $this->getOutput();
56 $out->setRobotPolicy( 'noindex,nofollow' );
57
58 // The editor should always see the latest content when starting their edit.
59 // Also to ensure cookie blocks can be set (T152462).
60 $out->disableClientCache();
61
62 $article = $this->getArticle();
63 if ( $this->getHookRunner()->onCustomEditor( $article, $this->getUser() ) ) {
64 $editor = new EditPage( $article );
65 $editor->setContextTitle( $this->getTitle() );
66 $editor->edit();
67 }
68 }
69
70 public function doesWrites() {
71 return true;
72 }
73}
getHookRunner()
Definition Action.php:255
getTitle()
Shortcut to get the Title object from the page.
Definition Action.php:211
getOutput()
Get the OutputPage being used for this instance.
Definition Action.php:141
getUser()
Shortcut to get the User being used for this instance.
Definition Action.php:151
getArticle()
Get a Article object.
Definition Action.php:201
useTransactionalTimeLimit()
Call wfTransactionalTimeLimit() if this request was POSTed.
Definition Action.php:471
Page edition handler (action=edit)
doesWrites()
Indicates whether this action may perform database writes.
An action which just does something, without showing a form first.
The HTML user interface for page editing.
Definition EditPage.php:145