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:256
getTitle()
Shortcut to get the Title object from the page.
Definition Action.php:212
getOutput()
Get the OutputPage being used for this instance.
Definition Action.php:142
getUser()
Shortcut to get the User being used for this instance.
Definition Action.php:152
getArticle()
Get a Article object.
Definition Action.php:202
useTransactionalTimeLimit()
Call wfTransactionalTimeLimit() if this request was POSTed.
Definition Action.php:478
Page edition handler (action=edit)
doesWrites()
Indicates whether POST requests handled by this action require write access to the wiki.
An action which just does something, without showing a form first.
The HTML user interface for page editing.
Definition EditPage.php:147